From 829c0da3816e798261437c8cf6ceba3ae26b91b5 Mon Sep 17 00:00:00 2001 From: Nikita Borzykh Date: Sun, 31 Mar 2024 00:47:00 +0300 Subject: [PATCH] fix: adjust condition in prefixFilterEntries prevent infinite loop (#5440) --- weed/filer/filerstore_wrapper.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/filer/filerstore_wrapper.go b/weed/filer/filerstore_wrapper.go index cc3e58363..986dadb77 100644 --- a/weed/filer/filerstore_wrapper.go +++ b/weed/filer/filerstore_wrapper.go @@ -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)