X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=alias.c;h=5d833571191bf89d6ed7d2444484ac51a9bc1f18;hp=508e24b6eb3d8b650589d7e6deac65d5d12b007a;hb=9ff4c5cafac6f3cda731034777f28ac5e71cc4fb;hpb=6833ce8bdca2d64e14485118f2a4417b7e1cb1b1 diff --git a/alias.c b/alias.c index 508e24b..5d83357 100644 --- a/alias.c +++ b/alias.c @@ -16,6 +16,10 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include "mutt.h" #include "mutt_regex.h" #include "mutt_curses.h" @@ -327,7 +331,7 @@ retry_name: if (mutt_get_field (_("Save to file: "), buf, sizeof (buf), M_FILE) != 0) return; mutt_expand_path (buf, sizeof (buf)); - if ((rc = fopen (buf, "a"))) + if ((rc = safe_fopen (buf, "a"))) { if (mutt_check_alias_name (new->name, NULL)) mutt_quote_filename (buf, sizeof (buf), new->name); @@ -569,7 +573,10 @@ int mutt_addr_is_user (ADDRESS *addr) if (mutt_match_rx_list (addr->mailbox, Alternates)) { dprint (5, (debugfile, "mail_addr_is_user: yes, %s matched by alternates.\n", addr->mailbox)); - return 1; + if (mutt_match_rx_list (addr->mailbox, UnAlternates)) + dprint (5, (debugfile, "mail_addr_is_user: but, %s matched by unalternates.\n", addr->mailbox)); + else + return 1; } dprint (5, (debugfile, "mail_addr_is_user: no, all failed.\n"));