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

onedrive: Onedrive Personal no longer supports description

Nick Craig-Wood8a31921fb011
diff --git a/backend/onedrive/metadata.go b/backend/onedrive/metadata.go
index f81a58188..866933e9a 100644
--- a/backend/onedrive/metadata.go
+++ b/backend/onedrive/metadata.go
@@ -60,7 +60,7 @@ var systemMetadataInfo = map[string]fs.MetadataHelp{
ReadOnly: true,
},
"description": {
- Help: "A short description of the file. Max 1024 characters. Only supported for OneDrive Personal.",
+ Help: "A short description of the file. Max 1024 characters. No longer supported by Microsoft.",
Type: "string",
Example: "Contract for signing",
},
@@ -259,12 +259,8 @@ func (m *Metadata) Set(ctx context.Context, metadata fs.Metadata) (numSet int, e
m.btime = t
numSet++
case "description":
- if m.fs.driveType != driveTypePersonal {
- fs.Debugf(m.remote, "metadata description is only supported for OneDrive Personal -- skipping: %s", v)
- continue
- }
- m.description = v
- numSet++
+ fs.Debugf(m.remote, "metadata description is no longer supported -- skipping: %s", v)
+ continue
case "permissions":
if !m.fs.opt.MetadataPermissions.IsSet(rwWrite) {
continue
@@ -292,9 +288,6 @@ func (m *Metadata) toAPIMetadata() api.Metadata {
update := api.Metadata{
FileSystemInfo: &api.FileSystemInfoFacet{},
}
- if m.description != "" && m.fs.driveType == driveTypePersonal {
- update.Description = m.description
- }
if !m.mtime.IsZero() {
update.FileSystemInfo.LastModifiedDateTime = api.Timestamp(m.mtime)
}
diff --git a/backend/onedrive/onedrive_internal_test.go b/backend/onedrive/onedrive_internal_test.go
index 843ede35f..ce0781d45 100644
--- a/backend/onedrive/onedrive_internal_test.go
+++ b/backend/onedrive/onedrive_internal_test.go
@@ -159,7 +159,7 @@ func (f *Fs) TestReadMetadata(t *testing.T, r *fstest.Run) {
if slices.Contains(optionals, k) {
continue
}
- if k == "description" && f.driveType != driveTypePersonal {
+ if k == "description" {
continue // not supported
}
gotV, ok := actualMeta[k]
@@ -196,7 +196,7 @@ func (f *Fs) TestDirectoryMetadata(t *testing.T, r *fstest.Run) {
if slices.Contains(optionals, k) {
continue
}
- if k == "description" && f.driveType != driveTypePersonal {
+ if k == "description" {
continue // not supported
}
gotV, ok := actualMeta[k]
@@ -417,9 +417,7 @@ func (f *Fs) compareMeta(t *testing.T, expectedMeta, actualMeta fs.Metadata, ign
compareTimeStrings(t, k, v, gotV, time.Second)
continue
case "description":
- if f.driveType != driveTypePersonal {
- continue // not supported
- }
+ continue // not supported
}
assert.True(t, ok, fmt.Sprintf("expected metadata key is missing: %v", k))
assert.Equal(t, v, gotV, actualMeta)