From 6426060804e0212795b59adff85dbced8cff4b5b Mon Sep 17 00:00:00 2001 From: Christophe Date: Wed, 2 Dec 2020 18:40:45 +0100 Subject: [PATCH] Fix relative paths bug Introduced in 74ea03945876c94c260b590e6140a7ee50630477 --- sync_url.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sync_url.py b/sync_url.py index c2ffb93..14c2c9e 100755 --- a/sync_url.py +++ b/sync_url.py @@ -37,14 +37,15 @@ def main() -> None: cookie_jar.load_cookies() - folder = args.folder + folder = Path(args.folder) if args.folder is None: - folder = crawler.find_element_name(args.url) + folder = Path(crawler.find_element_name(args.url)) cookie_jar.save_cookies() # files may not escape the pferd_root with relative paths # note: Path(Path.cwd, Path(folder)) == Path(folder) if it is an absolute path pferd_root = Path(Path.cwd(), Path(folder)).parent + folder = folder.name pferd = Pferd(pferd_root, test_run=args.test_run) def dir_filter(_: Path, element: IliasElementType) -> bool: