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
@@ -207,7 +207,7 @@ def RenameFile(SourcePath: Path, NewName: str) -> Path:
"""Renames a file and its Book together; undoes the file rename if the
Book can't follow. Returns the new path."""
NewName = NewName.strip()
if not NewName or "/" in NewName or NewName in (".", ".."):
if not NewName or "/" in NewName or "\\" in NewName or NewName in (".", ".."):
raise DataError("That isn't a valid file name.")
if NewName.startswith("."):
raise DataError("Names starting with a dot are hidden, and SaraTag skips hidden files.")