mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
HealObjects should remove objects without quorum (#7407)
This PR adds a way to list objects without quorum such that they can purged by `mc admin heal --remove`
This commit is contained in:
committed by
kannappanr
parent
9629de8230
commit
4a698c731b
11
cmd/posix.go
11
cmd/posix.go
@@ -1358,9 +1358,18 @@ func (s *posix) RenameFile(srcVolume, srcPath, dstVolume, dstPath string) (err e
|
||||
if err == nil && !isDirEmpty(dstFilePath) {
|
||||
return errFileAccessDenied
|
||||
}
|
||||
if !os.IsNotExist(err) {
|
||||
if err != nil && !os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
// Empty destination remove it before rename.
|
||||
if isDirEmpty(dstFilePath) {
|
||||
if err = os.Remove(dstFilePath); err != nil {
|
||||
if isSysErrNotEmpty(err) {
|
||||
return errFileAccessDenied
|
||||
}
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err = renameAll(srcFilePath, dstFilePath); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user