fix regression introduced in 73359dc55ff8f4da32149f7270f7ceaccd658256.
[apps/madmutt.git] / muttlib.c
index 48644d8..c595af6 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -115,7 +115,7 @@ ssize_t _mutt_expand_path(char *buf, ssize_t len, const char *s, int rx)
         break;
 
       case '<':
-        m_strcpy(p, sizeof(p), Outbox);
+        m_strcpy(p, sizeof(p), MAlias.record);
         tail = s + 1;
         break;
 
@@ -278,13 +278,7 @@ int mutt_check_overwrite (const char *attname, const char *path,
 void mutt_save_path(char *d, ssize_t dsize, address_t *a)
 {
     if (a && a->mailbox) {
-        m_strcpy(d, dsize, a->mailbox);
-
-        if (!option(OPTSAVEADDRESS)) {
-            char *p = strpbrk(d, "%@");
-            if (p)
-                *p = '\0';
-        }
+        m_strncpy(d, dsize, a->mailbox, strcspn(d, "%@"));
         m_strtolower(d);
     } else {
         *d = '\0';