syncurl: Sanitize element name on windows if it is used as folder name

Otherwise the name of the course might not be a invalid file name.
This commit is contained in:
I-Al-Istannen 2021-02-06 22:51:08 +01:00
parent 35c3fa205d
commit 83b75e8254

View File

@ -113,7 +113,7 @@ def main() -> None:
if not element_name:
print("Error, could not get element name. Please specify a folder yourself.")
return
folder = Path(element_name)
folder = sanitize_windows_path(Path(element_name.replace("/", "-").replace("\\", "-")))
cookie_jar.save_cookies()
else:
folder = Path(args.folder)