mirror of
https://github.com/minio/minio.git
synced 2025-12-05 23:33:13 -05:00
heal: Remove empty directories (#11354)
Since the introduction of __XLDIR__, an empty directory does not have a meaning anymore in erasure mode. Make healing removes it wherever it finds it.
This commit is contained in:
@@ -24,8 +24,9 @@ import (
|
||||
|
||||
// TreeWalkResult - Tree walk result carries results of tree walking.
|
||||
type TreeWalkResult struct {
|
||||
entry string
|
||||
end bool
|
||||
entry string
|
||||
isEmptyDir bool
|
||||
end bool
|
||||
}
|
||||
|
||||
// Return entries that have prefix prefixEntry.
|
||||
@@ -254,7 +255,7 @@ func doTreeWalk(ctx context.Context, bucket, prefixDir, entryPrefixMatch, marker
|
||||
select {
|
||||
case <-endWalkCh:
|
||||
return false, errWalkAbort
|
||||
case resultCh <- TreeWalkResult{entry: pathJoin(prefixDir, entry), end: isEOF}:
|
||||
case resultCh <- TreeWalkResult{entry: pathJoin(prefixDir, entry), isEmptyDir: leafDir, end: isEOF}:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user