fix: record extral skippedEntry for listObject (#21484)

This commit is contained in:
jiuker
2025-08-01 23:53:35 +08:00
committed by GitHub
parent e3d183b6a4
commit 71f293d9ab
2 changed files with 47 additions and 1 deletions

View File

@@ -225,7 +225,10 @@ func (o *listPathOptions) gatherResults(ctx context.Context, in <-chan metaCache
continue
}
if yes := o.shouldSkip(ctx, entry); yes {
results.lastSkippedEntry = entry.name
// when we have not enough results, record the skipped entry
if o.Limit > 0 && results.len() < o.Limit {
results.lastSkippedEntry = entry.name
}
continue
}
if o.Limit > 0 && results.len() >= o.Limit {