diff --git a/backend/s3/s3.go b/backend/s3/s3.go index d0a2677ffce31..f924512577a80 100644 --- a/backend/s3/s3.go +++ b/backend/s3/s3.go @@ -5132,6 +5132,12 @@ func (o *Object) SetModTime(ctx context.Context, modTime time.Time) error { if err != nil { return err } + + // Do not copy to itself if metadata is already correct ? + if o.meta[metaMtime] == swift.TimeToFloatString(modTime) { + return nil + } + o.meta[metaMtime] = swift.TimeToFloatString(modTime) // Can't update metadata here, so return this error to force a recopy