mirror of
https://github.com/versity/versitygw.git
synced 2026-01-03 10:35:15 +00:00
fix: Changed Walk function last object check to avoid panic
This commit is contained in:
@@ -64,9 +64,7 @@ func Walk(fileSystem fs.FS, prefix, delimiter, marker string, max int32, getObj
|
|||||||
}
|
}
|
||||||
|
|
||||||
if pastMax {
|
if pastMax {
|
||||||
if max < 1 {
|
if len(objects) != 0 {
|
||||||
truncated = true
|
|
||||||
} else {
|
|
||||||
newMarker = *objects[len(objects)-1].Key
|
newMarker = *objects[len(objects)-1].Key
|
||||||
truncated = true
|
truncated = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user