webdav: use root url to check and on mkdir to find recurse depth (#5742)

This commit is contained in:
Saugat Pachhai
2021-03-31 15:46:49 +03:00
committed by GitHub
parent 4d4f9427d1
commit 098a519305
+2 -2
View File
@@ -117,7 +117,7 @@ class WebDAVFileSystem(BaseFileSystem): # pylint:disable=abstract-method
)
# Check whether connection is valid (root should always exist)
if not client.check("/"):
if not client.check(self.path_info.path):
raise WebDAVConnectionError(self.hostname)
return client
@@ -213,7 +213,7 @@ class WebDAVFileSystem(BaseFileSystem): # pylint:disable=abstract-method
# Creates directories
def makedirs(self, path_info):
# Terminate recursion
if path_info.path == "/" or self.exists(path_info):
if path_info.path == self.path_info.path or self.exists(path_info):
return
# Recursively descent to root