~sircmpwn/aerc

f74605793ef1595cbc139bee4a6ea18cabc498b8 — Reto Brunner 2 years ago 8cd2485
FindFirstNonMultipart: return the proper path

There was a bug that lead to the wrong path being returned by the function.
1 files changed, 1 insertions(+), 1 deletions(-)

M lib/structure_helpers.go
M lib/structure_helpers.go => lib/structure_helpers.go +1 -1
@@ 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