From e48d00a022c418105ccac4f13bd19750b1149482 Mon Sep 17 00:00:00 2001 From: Jan Beilicke Date: Fri, 10 Apr 2020 20:58:21 +0200 Subject: [PATCH] download_sync: Works around webdav3.exceptions.RemoteResourceNotFound triggered by duplicated path segments --- webdav3/client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/webdav3/client.py b/webdav3/client.py index 9e495d1..23cab3e 100644 --- a/webdav3/client.py +++ b/webdav3/client.py @@ -360,6 +360,8 @@ class Client(object): os.makedirs(local_path) for resource_name in self.list(urn.path()): + if urn.path().endswith(resource_name): + continue _remote_path = "{parent}{name}".format(parent=urn.path(), name=resource_name) _local_path = os.path.join(local_path, resource_name) self.download(local_path=_local_path, remote_path=_remote_path, progress=progress)