diff options
author | Reto Brunner <reto@labrat.space> | 2021-02-26 22:01:18 +0100 |
---|---|---|
committer | Reto Brunner <reto@labrat.space> | 2021-03-07 14:52:42 +0100 |
commit | f74605793ef1595cbc139bee4a6ea18cabc498b8 (patch) | |
tree | 74698914a795862f2e078be89897ef0c46100dd7 /lib | |
parent | 8cd2485170e97867321fac2f26ba876f377d5d8e (diff) | |
download | aerc-f74605793ef1595cbc139bee4a6ea18cabc498b8.tar.gz |
FindFirstNonMultipart: return the proper path
There was a bug that lead to the wrong path being returned by the function.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/structure_helpers.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/structure_helpers.go b/lib/structure_helpers.go index 21159a2..4abf304 100644 --- a/lib/structure_helpers.go +++ b/lib/structure_helpers.go @@ -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 |