diff --git a/drives/sync/webdav.go b/drives/sync/webdav.go index 6117f488..8d53a4cc 100644 --- a/drives/sync/webdav.go +++ b/drives/sync/webdav.go @@ -73,7 +73,7 @@ func (t *WebDAVTarget) Dir(path string) ([]*Object, error) { } var objects []*Object for _, fi := range fis { - if fi.Path != "/" { + if fi.Path != "/" && fi.Path != t.cfg.URL.Path+"/" { objects = append(objects, &Object{ Path: filepath.Base(fi.Path), IsDir: fi.IsDir, diff --git a/drives/sync/zrok.go b/drives/sync/zrok.go index 79fa08da..4d036e0e 100644 --- a/drives/sync/zrok.go +++ b/drives/sync/zrok.go @@ -92,7 +92,7 @@ func (t *ZrokTarget) Dir(path string) ([]*Object, error) { } var objects []*Object for _, fi := range fis { - if fi.Path != "/" { + if fi.Path != "/" && fi.Path != t.cfg.URL.Path+"/" { objects = append(objects, &Object{ Path: filepath.Base(fi.Path), IsDir: fi.IsDir,