X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=muttlib.c;h=c595af694a17b8ca5b6ec5ec170df12201aa4a7c;hb=3c6c404b6be0ed70ffba80cece46050930149b59;hp=48644d840b5aa354ac345edea5eec952b3d67b05;hpb=558b0bd9de90a9dc28f409d8f46679bf48c72ded;p=apps%2Fmadmutt.git 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';