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

drive: fix backend copyid of google doc to directory - fixes #5196

Nick Craig-Wooddc286529bcbe
diff --git a/backend/drive/drive.go b/backend/drive/drive.go
index 32ccd9215..e634f1954 100755
--- a/backend/drive/drive.go
+++ b/backend/drive/drive.go
@@ -3069,7 +3069,7 @@ func (f *Fs) copyID(ctx context.Context, id, dest string) (err error) {
return err
}
if destLeaf == "" {
- destLeaf = info.Name
+ destLeaf = path.Base(o.Remote())
}
if destDir == "" {
destDir = "."