summaryrefslogtreecommitdiffstats
path: root/commands.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-06-15 15:19:45 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-06-15 15:19:45 +0000
commita07d9f79f6a533ec83d64dda1c824e3a81c2d493 (patch)
tree0b024e76c4f235e5f917ca179731c1515b615fc7 /commands.c
parent90bea32a9b22777b4b32e787661aa532c7d77fc2 (diff)
Brandon's IMAP patch.
Diffstat (limited to 'commands.c')
-rw-r--r--commands.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/commands.c b/commands.c
index da508df9..0144238f 100644
--- a/commands.c
+++ b/commands.c
@@ -511,10 +511,13 @@ static int save_confirm_func (const char *s, struct stat *st)
{
char tmp[_POSIX_PATH_MAX];
int ret = 1;
+ int magic = 0;
+
+ magic = mx_get_magic (s);
if (stat (s, st) != -1)
{
- if (mx_get_magic (s) == -1)
+ if (magic == -1)
{
mutt_error ("%s is not a mailbox!", s);
return 0;
@@ -529,22 +532,25 @@ static int save_confirm_func (const char *s, struct stat *st)
}
else
{
- st->st_mtime = 0;
- st->st_atime = 0;
-
- if (errno == ENOENT)
+ if (magic != M_IMAP)
{
- if (option (OPTCONFIRMCREATE))
+ st->st_mtime = 0;
+ st->st_atime = 0;
+
+ if (errno == ENOENT)
{
- snprintf (tmp, sizeof (tmp), "Create %s?", s);
- if (mutt_yesorno (tmp, 1) < 1)
- ret = 0;
+ if (option (OPTCONFIRMCREATE))
+ {
+ snprintf (tmp, sizeof (tmp), "Create %s?", s);
+ if (mutt_yesorno (tmp, 1) < 1)
+ ret = 0;
+ }
+ }
+ else
+ {
+ mutt_perror (s);
+ return 0;
}
- }
- else
- {
- mutt_perror (s);
- return 0;
}
}