summaryrefslogtreecommitdiffstats
path: root/mh.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2016-11-13 20:02:35 -0800
committerKevin McCarthy <kevin@8t8.us>2016-11-13 20:02:35 -0800
commitd3705ea8b23de24a63a4b659ead18a0cf6fb756a (patch)
tree3d506dfe6056d7c085402c2b848a1fc0862120b5 /mh.c
parentf46e648f568c38b57ada874cea87e561e3a235c7 (diff)
Create mx_ops.sync operation. Refactor compress to use the mx_ops.sync.
Change compress.sync_mailbox() to lock the compressed mailbox around both the tempfile sync and compress operations. This will prevent changes made inbetween the two syncs from being overwritten. Thanks to Damien Riegel for his original patch refactoring mx_ops.sync, which this patch is partially based upon.
Diffstat (limited to 'mh.c')
-rw-r--r--mh.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mh.c b/mh.c
index 371656af..41493f91 100644
--- a/mh.c
+++ b/mh.c
@@ -2536,6 +2536,7 @@ struct mx_ops mx_maildir_ops = {
.commit_msg = maildir_commit_message,
.open_new_msg = maildir_open_new_message,
.check = maildir_check_mailbox,
+ .sync = mh_sync_mailbox,
};
struct mx_ops mx_mh_ops = {
@@ -2547,4 +2548,5 @@ struct mx_ops mx_mh_ops = {
.commit_msg = mh_commit_message,
.open_new_msg = mh_open_new_message,
.check = mh_check_mailbox,
+ .sync = mh_sync_mailbox,
};