mirror of
https://github.com/rclone/rclone.git
synced 2026-01-03 17:13:18 +00:00
drive: fix upload to existing file (#2032)
This fixes uploads to existing files for Google Drive introduced by #2007. Instead of updating the old file a new "Untitled" file would be created in the root folder.
This commit is contained in:
@@ -824,7 +824,7 @@ func (f *Fs) PutUnchecked(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOpt
|
||||
}
|
||||
} else {
|
||||
// Upload the file in chunks
|
||||
info, err = f.Upload(in, size, createInfo.MimeType, createInfo, remote)
|
||||
info, err = f.Upload(in, size, createInfo.MimeType, "", createInfo, remote)
|
||||
if err != nil {
|
||||
return o, err
|
||||
}
|
||||
@@ -1503,7 +1503,7 @@ func (o *Object) Update(in io.Reader, src fs.ObjectInfo, options ...fs.OpenOptio
|
||||
}
|
||||
} else {
|
||||
// Upload the file in chunks
|
||||
info, err = o.fs.Upload(in, size, updateInfo.MimeType, updateInfo, o.remote)
|
||||
info, err = o.fs.Upload(in, size, updateInfo.MimeType, o.id, updateInfo, o.remote)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user