aboutsummaryrefslogtreecommitdiffstats
path: root/lib/structure_helpers.go
diff options
context:
space:
mode:
authorReto Brunner <reto@labrat.space>2021-02-26 22:01:18 +0100
committerReto Brunner <reto@labrat.space>2021-03-07 14:52:42 +0100
commitf74605793ef1595cbc139bee4a6ea18cabc498b8 (patch)
tree74698914a795862f2e078be89897ef0c46100dd7 /lib/structure_helpers.go
parent8cd2485170e97867321fac2f26ba876f377d5d8e (diff)
downloadaerc-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/structure_helpers.go')
-rw-r--r--lib/structure_helpers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/structure_helpers.go b/lib/structure_helpers.go
index 21159a2b..4abf3040 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