From 900e888695c8058d1a97a2314b3dfabc6942f463 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 27 Oct 2021 23:45:48 -0700 Subject: [PATCH] filer: avoid possible prefixed pagination loop on unsupported filer stores --- 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 705f6635b..47b5036f7 100644 --- a/weed/filer/filerstore_wrapper.go +++ b/weed/filer/filerstore_wrapper.go @@ -296,7 +296,7 @@ func (fsw *FilerStoreWrapper) prefixFilterEntries(ctx context.Context, dirPath u } if count < limit { notPrefixed = notPrefixed[:0] - _, err = actualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, false, limit, func(entry *Entry) bool { + lastFileName, err = actualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, false, limit, func(entry *Entry) bool { notPrefixed = append(notPrefixed, entry) return true })