From 83b75e8254d5ed36a629ac35e901772c66066691 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Sat, 6 Feb 2021 22:51:08 +0100 Subject: [PATCH] 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. --- sync_url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync_url.py b/sync_url.py index c6db255..ab079c3 100755 --- a/sync_url.py +++ b/sync_url.py @@ -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)