mirror of
https://git.srhtnin.garden/sarah/SaraTag.git
synced 2026-10-15 02:43:17 +02:00
Windows support
This commit is contained in:
1 parent
9757518d8e
commit
8eb9943a30
14 files changed
+92
-17
No files matched your search
@@ -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.")
|
||||
|
||||
Reference in new issue
Block a user