update
This commit is contained in:
parent
23ac15c9e2
commit
d3855aee27
@ -97,12 +97,12 @@ func (f *FileSystemManager) ListDirectoryEntries(ctx context.Context, p utils.Fu
|
|||||||
|
|
||||||
logger.Info("listing directory %s => startFileName:%s inclusive:%t count:%d", p, startFileName, inclusive, limit)
|
logger.Info("listing directory %s => startFileName:%s inclusive:%t count:%d", p, startFileName, inclusive, limit)
|
||||||
|
|
||||||
lastFileName, err = f.StreamListDirectoryEntries(ctx, p, startFileName, inclusive, limit+1, func(entry *utils.Entry) bool {
|
lastFileName, err = f.StreamListDirectoryEntries(ctx, p, startFileName, inclusive, limit, func(entry *utils.Entry) bool {
|
||||||
entries = append(entries, entry)
|
entries = append(entries, entry)
|
||||||
return true
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
hasMore = int64(len(entries)) >= limit+1
|
hasMore = int64(len(entries)) >= limit
|
||||||
if hasMore {
|
if hasMore {
|
||||||
entries = entries[:limit]
|
entries = entries[:limit]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user