From 5b8cdaff39de4a763dbc96cb3c91e12ec1f111af Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 14 Apr 2024 17:17:35 +0100 Subject: [PATCH] drive: fix description being overwritten on server side moves Before this the description for files got overwritten on server side moves. This change stops rclone setting the description to the leaf name completely. See: https://forum.rclone.org/t/file-descriptions-in-google-drive-not-shown-after-dedupe/45510 Fixes: #7770 --- backend/drive/drive.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/backend/drive/drive.go b/backend/drive/drive.go index 0e97d9553..1f0afcdc4 100644 --- a/backend/drive/drive.go +++ b/backend/drive/drive.go @@ -1747,10 +1747,9 @@ func (f *Fs) createDir(ctx context.Context, pathID, leaf string, metadata fs.Met leaf = f.opt.Enc.FromStandardName(leaf) pathID = actualID(pathID) createInfo := &drive.File{ - Name: leaf, - Description: leaf, - MimeType: driveFolderType, - Parents: []string{pathID}, + Name: leaf, + MimeType: driveFolderType, + Parents: []string{pathID}, } var updateMetadata updateMetadataFn if len(metadata) > 0 { @@ -2430,7 +2429,6 @@ func (f *Fs) createFileInfo(ctx context.Context, remote string, modTime time.Tim // Define the metadata for the file we are going to create. createInfo := &drive.File{ Name: leaf, - Description: leaf, Parents: []string{directoryID}, ModifiedTime: modTime.Format(timeFormatOut), }