FindFirstNonMultipart: return the proper path
There was a bug that lead to the wrong path being returned by the function.
This commit is contained in:
parent
8cd2485170
commit
f74605793e
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ func FindFirstNonMultipart(bs *models.BodyStructure, path []int) []int {
|
|||
cur := append(path, i+1)
|
||||
mimetype := strings.ToLower(part.MIMEType)
|
||||
if mimetype != "multipart" {
|
||||
return path
|
||||
return cur
|
||||
} else if mimetype == "multipart" {
|
||||
if path := FindFirstNonMultipart(part, cur); path != nil {
|
||||
return path
|
||||
|
|
Loading…
Reference in a new issue