download_sync: Works around webdav3.exceptions.RemoteResourceNotFound triggered by duplicated path segments
This commit is contained in:
		
							parent
							
								
									a3c75b7155
								
							
						
					
					
						commit
						e48d00a022
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -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) | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue