mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 08:23:47 +01:00
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
@ -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 New Issue
Block a user