about summary refs log tree commit diff stats
path: root/lib/structure_helpers.go
diff options
context:
space:
mode:
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 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