1
0
mirror of https://git.sr.ht/~sircmpwn/aerc synced 2024-11-23 00:21:59 +01:00

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:
Reto Brunner 2021-02-26 22:01:18 +01:00
parent 8cd2485170
commit f74605793e

@ -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