summaryrefslogtreecommitdiff
path: root/alot/account.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/account.py')
-rw-r--r--alot/account.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/alot/account.py b/alot/account.py
index ab6c9af7..88d2ce10 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -129,7 +129,10 @@ class Account(object):
if isinstance(mbx, mailbox.Maildir):
# this is a dirty hack to get the path to the newly added file
# I wish the mailbox module were more helpful...
- path = glob.glob(os.path.join(mbx._path, '*', message_id + '*'))[0]
+ plist = glob.glob1(os.path.join(mbx._path, 'new'), message_id + '*')
+ if plist:
+ path = os.path.join(mbx._path, 'new', plist[0])
+ logging.debug('path of saved msg: %s' % path)
return path
def store_sent_mail(self, mail):