useless options, cluttering the codebase that can be emulated if needed in fcc-hooks.
[apps/madmutt.git] / muttlib.c
index 3f223a6..c595af6 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -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';