diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2000-12-21 09:19:41 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2000-12-21 09:19:41 +0000 |
commit | 99c394e8cd4d2079b5b8d6ca001336dd9974ac75 (patch) | |
tree | 6dc5e1187a0210feba9b2eb7a7a75b647449a4e2 /flags.c | |
parent | c19d6fb7a430519ed01c04e9d40513304559497a (diff) |
patch.me.maildir_trash.1
Diffstat (limited to 'flags.c')
-rw-r--r-- | flags.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -38,6 +38,17 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) if (!h->deleted) { h->deleted = 1; + if (ctx->magic == M_MAILDIR && option(OPTMAILDIRTRASH)) + { + /* As with the IMAP comment below, we need to mark the + * message and mailbox as changed, because deleting a message + * just changes its status on disk without actually deleting + * it. Without this, the 'T' flag would never get set when + * the maildir box is synched. + */ + h->changed = 1; + if (upd_ctx) ctx->changed = 1; + } if (upd_ctx) ctx->deleted++; #ifdef USE_IMAP /* deleted messages aren't treated as changed elsewhere so that the @@ -54,6 +65,17 @@ void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) { h->deleted = 0; if (upd_ctx) ctx->deleted--; + if (ctx->magic == M_MAILDIR && option(OPTMAILDIRTRASH)) + { + /* As with the IMAP comment below, we need to mark the + * message and mailbox as changed, because deleting a message + * just changes its status on disk without actually deleting + * it. Without this, the 'T' flag would never get set when + * the maildir box is synched. + */ + h->changed = 1; + if (upd_ctx) ctx->changed = 1; + } #ifdef USE_IMAP /* see my comment above */ if (ctx->magic == M_IMAP) |