X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=muttlib.c;h=94c7816e0bde49f78b9a1f78667214c9e6920bb5;hp=72566aa0cdd14cd557254227fb0d9297c64c6e18;hb=95fc7c1442ca6109151bbd34716cd9caeb85042a;hpb=a9d22903ab440da5d0b4d994d9de49ff2cf663d4 diff --git a/muttlib.c b/muttlib.c index 72566aa..94c7816 100644 --- a/muttlib.c +++ b/muttlib.c @@ -1225,16 +1225,10 @@ int mutt_save_confirm (const char *s, struct stat *st) } #endif - if (stat (s, st) != -1) { - if (magic == -1) { - mutt_error (_("%s is not a mailbox!"), s); - return 1; - } - + if (magic > 0 && !mx_access (s, W_OK)) { if (option (OPTCONFIRMAPPEND) && - (!TrashPath || (mutt_strcmp (s, TrashPath) != 0))) + (!TrashPath || (mutt_strcmp (s, TrashPath) != 0))) { /* if we're appending to the trash, there's no point in asking */ - { snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s); if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO) ret = 1; @@ -1242,6 +1236,13 @@ int mutt_save_confirm (const char *s, struct stat *st) ret = -1; } } + + if (stat (s, st) != -1) { + if (magic == -1) { + mutt_error (_("%s is not a mailbox!"), s); + return 1; + } + } else { #ifdef USE_IMAP if (magic != M_IMAP)