Browse Source

filer: avoid possible prefixed pagination loop on unsupported filer stores

pull/2397/head
Chris Lu 3 years ago
parent
commit
900e888695
  1. 2
      weed/filer/filerstore_wrapper.go

2
weed/filer/filerstore_wrapper.go

@ -296,7 +296,7 @@ func (fsw *FilerStoreWrapper) prefixFilterEntries(ctx context.Context, dirPath u
} }
if count < limit { if count < limit {
notPrefixed = notPrefixed[:0] 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) notPrefixed = append(notPrefixed, entry)
return true return true
}) })

Loading…
Cancel
Save