mirror of
https://git.srhtnin.garden/sarah/SaraTag.git
synced 2026-10-13 18:28:16 +02:00
Windows support
This commit is contained in:
1 parent
9757518d8e
commit
8eb9943a30
14 files changed
+92
-17
No files matched your search
+1
-1
@@ -363,7 +363,7 @@ def KnownLexicons(Directories: list[Path]) -> list[Path]:
|
||||
def NewSharedLexicon(Name: str) -> Path:
|
||||
"""An empty Lexicon in Lexicons/ for other Lexicons to inherit from."""
|
||||
Name = Name.strip().removesuffix(".toml")
|
||||
if not Name or "/" in Name or Name.startswith("."):
|
||||
if not Name or "/" in Name or "\\" in Name or Name.startswith("."):
|
||||
raise DataError("That isn't a valid file name.")
|
||||
LexiconsDir.mkdir(parents=True, exist_ok=True)
|
||||
FilePath = LexiconsDir / f"{Name}.toml"
|
||||
|
||||
Reference in new issue
Block a user