Merge pull request #251 from versity/fix/walk-last-elem

Walk function last object check panic fix
This commit is contained in:
Ben McClelland
2023-09-18 08:29:08 -07:00
committed by GitHub

View File

@@ -64,9 +64,7 @@ func Walk(fileSystem fs.FS, prefix, delimiter, marker string, max int32, getObj
}
if pastMax {
if max < 1 {
truncated = true
} else {
if len(objects) != 0 {
newMarker = *objects[len(objects)-1].Key
truncated = true
}