fix: adjust condition in prefixFilterEntries prevent infinite loop (#5440)

This commit is contained in:
Nikita Borzykh
2024-03-31 00:47:00 +03:00
committed by GitHub
parent f9ec92dd83
commit 829c0da381

View File

@@ -303,7 +303,7 @@ func (fsw *FilerStoreWrapper) prefixFilterEntries(ctx context.Context, dirPath u
}
}
}
if count < limit && lastFileName <= prefix {
if count < limit && lastFileName < prefix {
notPrefixed = notPrefixed[:0]
lastFileName, err = actualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, false, limit, func(entry *Entry) bool {
notPrefixed = append(notPrefixed, entry)