fix: Changed Walk function last object check to avoid panic

This commit is contained in:
jonaustin09
2023-09-18 08:20:08 -04:00
parent 7a0c4423e4
commit ee1ab5bdcc

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
}