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

This commit is contained in:
Nick Craig-Wood 2018-04-20 20:28:23 +01:00
parent 1a3fb21a77
commit dc59836021

View File

@ -256,6 +256,7 @@ func NewFs(name, root string) (fs.Fs, error) {
if !strings.HasSuffix(endpoint, "/") { if !strings.HasSuffix(endpoint, "/") {
endpoint += "/" endpoint += "/"
} }
root = strings.Trim(root, "/")
user := config.FileGet(name, "user") user := config.FileGet(name, "user")
pass := config.FileGet(name, "pass") pass := config.FileGet(name, "pass")