Merge d270bef4e8dc6a781320cacbdee19e5a3080c0ee into 0b9671313b14ffe839ecbd7dd2ae5ac7f6f05db8

This commit is contained in:
Andriy Senyshyn 2025-04-11 19:29:46 +05:30 committed by GitHub
commit c740e22237
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2214,6 +2214,15 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
// Stat the file after the upload to read its stats back if o.fs.opt.SetModTime == false
if !o.fs.opt.SetModTime {
ci := fs.GetConfig(ctx)
if ci.NoCheckDest {
fs.Debugf(o, "--no-check-dest is set, so returning best guess")
o.modTime = uint32(src.ModTime(ctx).Unix())
o.size = src.Size()
o.mode = os.FileMode(0666) // regular file
return nil
}
err = o.stat(ctx)
if err == fs.ErrorObjectNotFound {
// In the specific case of o.fs.opt.SetModTime == false