mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
return false if not found
fix https://github.com/chrislusf/seaweedfs/issues/3011
This commit is contained in:
parent
b201edb9df
commit
f17cd0d5cd
|
@ -178,6 +178,9 @@ func findByPartNumber(fileName string, parts []CompletedPart) (etag string, foun
|
||||||
x := sort.Search(len(parts), func(i int) bool {
|
x := sort.Search(len(parts), func(i int) bool {
|
||||||
return parts[i].PartNumber >= partNumber
|
return parts[i].PartNumber >= partNumber
|
||||||
})
|
})
|
||||||
|
if x >= len(parts) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if parts[x].PartNumber != partNumber {
|
if parts[x].PartNumber != partNumber {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue