mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
fix: preserve shared dataDir during suspend overwrites (#12058)
CopyObject() when shares dataDir needs to be preserved, and upon versioning suspended overwrites should still preserve the dataDir.
This commit is contained in:
@@ -2020,9 +2020,11 @@ func (s *xlStorage) RenameData(ctx context.Context, srcVolume, srcPath, dataDir,
|
||||
// return the latest "null" versionId info
|
||||
ofi, err := xlMeta.ToFileInfo(dstVolume, dstPath, nullVersionID)
|
||||
if err == nil && !ofi.Deleted {
|
||||
// Purge the destination path as we are not preserving anything
|
||||
// versioned object was not requested.
|
||||
oldDstDataPath = pathJoin(dstVolumeDir, dstPath, ofi.DataDir)
|
||||
if xlMeta.SharedDataDirCountStr(nullVersionID, ofi.DataDir) == 0 {
|
||||
// Purge the destination path as we are not preserving anything
|
||||
// versioned object was not requested.
|
||||
oldDstDataPath = pathJoin(dstVolumeDir, dstPath, ofi.DataDir)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user