X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=c595af694a17b8ca5b6ec5ec170df12201aa4a7c;hp=48644d840b5aa354ac345edea5eec952b3d67b05;hb=7d7b69b974a2db6f66c586de0840ec55c4150d0e;hpb=558b0bd9de90a9dc28f409d8f46679bf48c72ded diff --git a/muttlib.c b/muttlib.c index 48644d8..c595af6 100644 --- 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';