X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mx%2Fcompress.c;h=65093c586cfb768ccd0310864387a99a914eaee5;hp=01e4a07c725d5e986eb2dc393b13a2e1af20d9e2;hb=19806c1ee3019ddf9facf23eb19a13c128abfba9;hpb=07066d3ea19865d08c4a8fd98b5e87eeace810da diff --git a/lib-mx/compress.c b/lib-mx/compress.c index 01e4a07..65093c5 100644 --- a/lib-mx/compress.c +++ b/lib-mx/compress.c @@ -59,7 +59,7 @@ static void mbox_unlock_compressed (CONTEXT * ctx, FILE * fp) static int is_new (const char *path) { - return (access (path, W_OK) && errno == ENOENT); + return access (path, W_OK) && errno == ENOENT; } static const char *find_compress_hook (int type, const char *path) @@ -102,7 +102,7 @@ int mutt_can_append_compressed (const char *path) int magic; if (is_new (path)) - return (find_compress_hook (M_CLOSEHOOK, path) ? 1 : 0); + return find_compress_hook (M_CLOSEHOOK, path) ? 1 : 0; magic = mx_get_magic (path); @@ -307,9 +307,7 @@ int mutt_open_append_compressed (CONTEXT * ctx) m_fclose(&fh); ctx->path = p_dupstr(tmppath, m_strlen(tmppath)); - - ctx->magic = DefaultMagic; - + ctx->magic = M_MBOX; if (is_new (ctx->realpath) || ctx->magic != M_MBOX) unlink(tmppath);