From 6d5d9333ad7f8aed4fdce2203134989beb883df9 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Mon, 19 Apr 2021 11:07:25 +0200 Subject: [PATCH] Force folder to be file-system path --- sync_url.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sync_url.py b/sync_url.py index 06a94b3..ca78de0 100755 --- a/sync_url.py +++ b/sync_url.py @@ -121,7 +121,8 @@ def main() -> None: # 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 - target = folder.resolve().name + # Folder might be a *PurePath* at this point + target = Path(folder).resolve().name pferd = Pferd(pferd_root, test_run=args.test_run) def dir_filter(_: Path, element: IliasElementType) -> bool: