fix: fitted to file system

This commit is contained in:
Hellow
2023-10-13 00:05:54 +02:00
parent ff8dd76190
commit b4cc0955fd
2 changed files with 10 additions and 6 deletions

View File

@@ -27,12 +27,15 @@ def unify(string: str) -> str:
def fit_to_file_system(string: str) -> str:
string = string.strip()
string = string.strip(".")
"""
while string[0] == ".":
if len(string) == 0:
return string
string = string[1:]
"""
string = string.replace("/", "_").replace("\\", "_")