Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

owncloud: add config owncloud_exclude_mounts which allows to exclude mounted folders when listing remote resources

Thomas Müllerc7bfadd10ae3
diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.go
index f1c16f35a..6aaa9d1dd 100644
--- a/backend/webdav/webdav.go
+++ b/backend/webdav/webdav.go
@@ -154,6 +154,11 @@ Set to 0 to disable chunked uploading.
Help: "Exclude ownCloud shares",
Advanced: true,
Default: false,
+ }, {
+ Name: "owncloud_exclude_mounts",
+ Help: "Exclude ownCloud mounted storages",
+ Advanced: true,
+ Default: false,
}},
})
}
@@ -171,6 +176,7 @@ type Options struct {
PacerMinSleep fs.Duration `config:"pacer_min_sleep"`
ChunkSize fs.SizeSuffix `config:"nextcloud_chunk_size"`
ExcludeShares bool `config:"owncloud_exclude_shares"`
+ ExcludeMounts bool `config:"owncloud_exclude_mounts"`
}
// Fs represents a remote webdav
@@ -805,10 +811,17 @@ func (f *Fs) listAll(ctx context.Context, dir string, directoriesOnly bool, file
}
}
if f.opt.ExcludeShares {
+ // https: //owncloud.dev/apis/http/webdav/#supported-webdav-properties
if strings.Contains(item.Props.Permissions, "S") {
continue
}
}
+ if f.opt.ExcludeMounts {
+ // https: //owncloud.dev/apis/http/webdav/#supported-webdav-properties
+ if strings.Contains(item.Props.Permissions, "M") {
+ continue
+ }
+ }
// item.Name = restoreReservedChars(item.Name)
if fn(remote, isDir, &item.Props) {
found = true