mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00:00
erasure: Set fi.IsLatest when adding a new version (#13277)
This commit is contained in:
1 parent
19ecdc75a8
commit
31d7cc2cd4
2 files changed
+8
No files matched your search
@@ -134,6 +134,8 @@ func (er erasureObjects) CopyObject(ctx context.Context, srcBucket, srcObject, d
|
||||
return oi, toObjectErr(err, srcBucket, srcObject)
|
||||
}
|
||||
|
||||
// we are adding a new version to this object under the namespace lock, so this is the latest version.
|
||||
fi.IsLatest = true
|
||||
return fi.ToObjectInfo(srcBucket, srcObject), nil
|
||||
}
|
||||
|
||||
@@ -1001,6 +1003,9 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
||||
fi.ReplicationState = opts.PutReplicationState()
|
||||
online = countOnlineDisks(onlineDisks)
|
||||
|
||||
// we are adding a new version to this object under the namespace lock, so this is the latest version.
|
||||
fi.IsLatest = true
|
||||
|
||||
return fi.ToObjectInfo(bucket, object), nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user