mirror of
https://github.com/versity/versitygw.git
synced 2026-03-27 18:05:00 +00:00
Merge pull request #1902 from s3-on-win/fix-1864-ListObjectVersions
fix: not return parent keys for ListObjectVersions
This commit is contained in:
@@ -389,6 +389,11 @@ func WalkVersions(ctx context.Context, fileSystem fs.FS, prefix, delimiter, keyM
|
||||
return fs.SkipDir
|
||||
}
|
||||
|
||||
// Skip parents of specified prefix
|
||||
if len(path+"/") < len(prefix) {
|
||||
return nil
|
||||
}
|
||||
|
||||
res, err := getObj(path, versionIdMarker, &pastVersionIdMarker, max-len(objects)-len(delMarkers)-cpmap.Len(), d)
|
||||
if err == ErrSkipObj {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user