X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mx%2Fcompress.c;h=62a0815ad37b4b0eed0b1eff114a71ed1df821fb;hp=6e988caa7148d64683cb0a8654218b36d634d2db;hb=55de28a5bb96c3edfbb2a3b080356acbb44a3cc4;hpb=558b0bd9de90a9dc28f409d8f46679bf48c72ded diff --git a/lib-mx/compress.c b/lib-mx/compress.c index 6e988ca..62a0815 100644 --- a/lib-mx/compress.c +++ b/lib-mx/compress.c @@ -266,7 +266,7 @@ static void restore_path (CONTEXT * ctx) /* remove the temporary mailbox */ static void remove_file (CONTEXT * ctx) { - if (ctx->magic == M_MBOX || ctx->magic == M_MMDF) + if (ctx->magic == M_MBOX) remove (ctx->path); } @@ -296,13 +296,10 @@ int mutt_open_append_compressed (CONTEXT * ctx) ctx->magic = DefaultMagic; - if (is_new (ctx->realpath) || - (ctx->magic != M_MBOX && - ctx->magic != M_MMDF)) + if (is_new (ctx->realpath) || ctx->magic != M_MBOX) unlink(tmppath); /* No error checking - the parent function will catch it */ - return 0; } @@ -313,11 +310,7 @@ void mutt_fast_close_compressed (CONTEXT * ctx) m_fclose(&ctx->fp); /* if the folder was removed, remove the gzipped folder too */ - if (access (ctx->path, F_OK) != 0 && !option (OPTSAVEEMPTY)) - remove (ctx->realpath); - else - remove_file (ctx); - + remove_file (ctx); restore_path (ctx); p_delete(&ctx->cinfo); }