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
1 changed files with 1 additions and 0 deletions

View File

@ -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")