mirror of
https://github.com/versity/versitygw.git
synced 2025-12-23 05:05:16 +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 max < 1 {
|
||||
truncated = true
|
||||
} else {
|
||||
if len(objects) != 0 {
|
||||
newMarker = *objects[len(objects)-1].Key
|
||||
truncated = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user