mirror of
https://github.com/minio/minio.git
synced 2026-11-10 00:44:10 +00:00
fix: translate empty versionID string to null version where appropriate (#11629)
We store the null version as empty string. We should translate it to null version for bucket with version suspended too.
This commit is contained in:
1 parent
b23659927c
commit
ca5c6e3160
1 file changed
+1
-1
@@ -102,7 +102,7 @@ func (fi FileInfo) IsValid() bool {
|
||||
func (fi FileInfo) ToObjectInfo(bucket, object string) ObjectInfo {
|
||||
object = decodeDirObject(object)
|
||||
versionID := fi.VersionID
|
||||
if globalBucketVersioningSys.Enabled(bucket) && versionID == "" {
|
||||
if (globalBucketVersioningSys.Enabled(bucket) || globalBucketVersioningSys.Suspended(bucket)) && versionID == "" {
|
||||
versionID = nullVersionID
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user