]> granicus.if.org Git - mutt/commitdiff
mx_open_mailbox_append: Add an error message and remove a file
authorThomas Roessler <roessler@does-not-exist.org>
Tue, 18 Jan 2000 22:46:18 +0000 (22:46 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Tue, 18 Jan 2000 22:46:18 +0000 (22:46 +0000)
descriptor leak when we can open, but can't lock an MMDF or MBOX
folder.

mx.c

diff --git a/mx.c b/mx.c
index e42ac2c2cb3b581758952ab07af8e63165a12204..759971966992341672370fa258413aa5cc555382 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -549,6 +549,11 @@ static int mx_open_mailbox_append (CONTEXT *ctx)
       {
        if (!ctx->fp)
          mutt_perror (ctx->path);
+       else
+       {
+         mutt_error (_("Couldn't lock %s\n"), ctx->path);
+         fclose (ctx->fp);
+       }
        return (-1);
       }
       fseek (ctx->fp, 0, 2);