aboutsummaryrefslogtreecommitdiff
path: root/plugins/base
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/base')
-rwxr-xr-xplugins/base/imap.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/base/imap.go b/plugins/base/imap.go
index 177fefc..dd78e3f 100755
--- a/plugins/base/imap.go
+++ b/plugins/base/imap.go
@@ -196,6 +196,9 @@ func (msg *IMAPMessage) PartByPath(path []int) *IMAPPartNode {
if msg.BodyStructure == nil {
return nil
}
+ if len(path) == 0 {
+ return newIMAPPartNode(msg, nil, msg.BodyStructure)
+ }
var result *IMAPPartNode
msg.BodyStructure.Walk(func(p []int, part *imap.BodyStructure) bool {