Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

webdav: strip leading and trailing / off root - fixes #2257

Nick Craig-Wooddc59836021ba
diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go
index 8eef8760d..5ffb9d4b4 100644
--- a/backend/webdav/webdav.go
+++ b/backend/webdav/webdav.go
@@ -256,6 +256,7 @@ func NewFs(name, root string) (fs.Fs, error) {
if !strings.HasSuffix(endpoint, "/") {
endpoint += "/"
}
+ root = strings.Trim(root, "/")
user := config.FileGet(name, "user")
pass := config.FileGet(name, "pass")