Windows support

This commit is contained in:
sarah committed 2026-10-09 14:21:42 +02:00
1 parent 9757518d8e
commit 8eb9943a30
14 files changed
+92 -17

No files matched your search

+1 -1
View File
@@ -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"