From 8a31921fb01129c8045e44be02752888c00655dc Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 29 Jan 2026 17:54:07 +0000 Subject: [PATCH] onedrive: Onedrive Personal no longer supports description Uploading files with description set is no longer allowed with Onedrive personal. This brings it into line with Onedrive business. --- backend/onedrive/metadata.go | 13 +++---------- backend/onedrive/onedrive_internal_test.go | 8 +++----- 2 files changed, 6 insertions(+), 15 deletions(-) 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)