Browse Source

accurate limit

pull/1431/head
Konstantin Lebedev 4 years ago
parent
commit
9a195bebfd
  1. 8
      weed/filer2/filerstore.go

8
weed/filer2/filerstore.go

@ -155,12 +155,11 @@ func (fsw *FilerStoreWrapper) ListDirectoryPrefixedEntries(ctx context.Context,
count++ count++
entries = append(entries, entry) entries = append(entries, entry)
} }
}
if count >= limit { if count >= limit {
break
goto Exit
} }
notPrefixed, err = fsw.ActualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, includeStartFile, limit)
}
notPrefixed, err = fsw.ActualStore.ListDirectoryEntries(ctx, dirPath, lastFileName, false, limit)
if err != nil { if err != nil {
return nil, err return nil, err
} }
@ -169,6 +168,7 @@ func (fsw *FilerStoreWrapper) ListDirectoryPrefixedEntries(ctx context.Context,
break break
} }
} }
Exit:
} }
} else if err != nil { } else if err != nil {
return nil, err return nil, err

Loading…
Cancel
Save