Browse Source

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

pull/5042/head
Nikita Borzykh 9 months ago
committed by GitHub
parent
commit
829c0da381
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      weed/filer/filerstore_wrapper.go

2
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)

Loading…
Cancel
Save