mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
heal: Fix new entries computation in listDirHeal (#3551)
A crash was happening due to an incorrect interpreation of the return value of sort.SearchString()
This commit is contained in:
parent
95d9e47353
commit
eb6d53d2f5
@ -58,7 +58,9 @@ func listDirHealFactory(isLeaf isLeafFunc, disks ...StorageAPI) listDirFunc {
|
||||
// find elements in entries which are not in mergedentries
|
||||
for _, entry := range entries {
|
||||
idx := sort.SearchStrings(mergedEntries, entry)
|
||||
if mergedEntries[idx] == entry {
|
||||
// idx different from len(mergedEntries) means entry is not found
|
||||
// in mergedEntries
|
||||
if idx < len(mergedEntries) {
|
||||
continue
|
||||
}
|
||||
newEntries = append(newEntries, entry)
|
||||
|
Loading…
Reference in New Issue
Block a user