forked from TrueCloudLab/rclone
webdav: fix interop with davrods server
The davrods server returns URLS with a double / in and the // confuses rclone into thinking these files are in a directory called "". The fix removes leading /s from the directory listing names. See: https://forum.rclone.org/t/upload-to-webdav-does-not-check-if-files-already-exist/35756/
This commit is contained in:
parent
ac20ee41ca
commit
21849fd0d9
1 changed files with 1 additions and 0 deletions
|
@ -712,6 +712,7 @@ func (f *Fs) listAll(ctx context.Context, dir string, directoriesOnly bool, file
|
|||
continue
|
||||
}
|
||||
subPath := u.Path[len(baseURL.Path):]
|
||||
subPath = strings.TrimPrefix(subPath, "/") // ignore leading / here for davrods
|
||||
if f.opt.Enc != encoder.EncodeZero {
|
||||
subPath = f.opt.Enc.ToStandardPath(subPath)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue