projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Have an event loop thread.
[apps/madmutt.git]
/
lib-mx
/
compress.c
diff --git
a/lib-mx/compress.c
b/lib-mx/compress.c
index
01e4a07
..
ec4db2b
100644
(file)
--- 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)
{
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)
}
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))
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);
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));
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);
if (is_new (ctx->realpath) || ctx->magic != M_MBOX)
unlink(tmppath);
@@
-472,4
+470,5
@@
mx_t const compress_mx = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
+ NULL,
};
};