"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
owncloud: add config `owncloud_exclude_shares` which allows to exclude shared files and folders when listing remote resources
Thomas Müller99b9062551df
diff --git a/backend/webdav/api/types.go b/backend/webdav/api/types.goindex 50feae106..f26f40e65 100644--- a/backend/webdav/api/types.go+++ b/backend/webdav/api/types.go@@ -75,6 +75,7 @@ type Prop struct {Size int64 `xml:"DAV: prop>getcontentlength,omitempty"`Modified Time `xml:"DAV: prop>getlastmodified,omitempty"`Checksums []string `xml:"prop>checksums>checksum,omitempty"`+ Permissions string `xml:"prop>permissions,omitempty"`MESha1Hex *string `xml:"ME: prop>sha1hex,omitempty"` // Fastmail-specific sha1 checksum}diff --git a/backend/webdav/webdav.go b/backend/webdav/webdav.goindex e8f83f66a..a2ef372c0 100644--- a/backend/webdav/webdav.go+++ b/backend/webdav/webdav.go@@ -149,6 +149,11 @@ Set to 0 to disable chunked uploading.`,Advanced: true,Default: 10 * fs.Mebi, // Default NextCloud `max_chunk_size` is `10 MiB`. See https://github.com/nextcloud/server/blob/0447b53bda9fe95ea0cbed765aa332584605d652/apps/files/lib/App.php#L57+ }, {+ Name: "owncloud_exclude_shares",+ Help: "Exclude ownCloud shares",+ Advanced: true,+ Default: false,}},})}@@ -165,6 +170,7 @@ type Options struct {Headers fs.CommaSepList `config:"headers"`PacerMinSleep fs.Duration `config:"pacer_min_sleep"`ChunkSize fs.SizeSuffix `config:"nextcloud_chunk_size"`+ ExcludeShares bool `config:"owncloud_exclude_shares"`}// Fs represents a remote webdav@@ -702,6 +708,7 @@ var owncloudProps = []byte(`<?xml version="1.0"?><d:resourcetype /><d:getcontenttype /><oc:checksums />+ <oc:permissions /></d:prop></d:propfind>`)@@ -797,6 +804,11 @@ func (f *Fs) listAll(ctx context.Context, dir string, directoriesOnly bool, filecontinue}}+ if f.opt.ExcludeShares {+ if strings.Contains(item.Props.Permissions, "S") {+ continue+ }+ }// item.Name = restoreReservedChars(item.Name)if fn(remote, isDir, &item.Props) {found = true