From dc59836021ba0131e864f24c115e175e98771db8 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 20 Apr 2018 20:28:23 +0100 Subject: [PATCH] webdav: strip leading and trailing / off root - fixes #2257 --- backend/webdav/webdav.go | 1 + 1 file changed, 1 insertion(+) 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")