X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/bc3ca5d2a5ca22c4ad1fde3bfaa97bb64c87961f..d3fc6a7510a8ece5fe23e56e6180b18aa9128d36:/debian/patches/features/imap_fast_trash?ds=sidebyside diff --git a/debian/patches/features/imap_fast_trash b/debian/patches/features/imap_fast_trash index def2bc2..b335bd9 100644 --- a/debian/patches/features/imap_fast_trash +++ b/debian/patches/features/imap_fast_trash @@ -4,11 +4,22 @@ Make "move to trash folder" use IMAP COPY. by Paul Miller (jettero) -diff --git a/imap/imap.c b/imap/imap.c -index f08b4ea..47a8035 100644 --- a/imap/imap.c +++ b/imap/imap.c -@@ -2028,3 +2028,54 @@ int imap_complete(char* dest, size_t dlen, char* path) { +@@ -893,6 +893,12 @@ static int imap_make_msg_set (IMAP_DATA* + if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted) + match = invert ^ hdrs[n]->deleted; + break; ++ case M_EXPIRED: /* imap_fast_trash version of M_DELETED */ ++ if (hdrs[n]->purged) ++ break; ++ if (hdrs[n]->deleted != HEADER_DATA(hdrs[n])->deleted) ++ match = invert ^ hdrs[n]->deleted; ++ break; + case M_FLAG: + if (hdrs[n]->flagged != HEADER_DATA(hdrs[n])->flagged) + match = invert ^ hdrs[n]->flagged; +@@ -2028,3 +2034,54 @@ int imap_complete(char* dest, size_t dle return -1; } @@ -32,7 +43,7 @@ index f08b4ea..47a8035 100644 + strfcpy (mbox, "INBOX", sizeof (mbox)); + imap_munge_mbox_name (mmbox, sizeof (mmbox), mbox); + -+ rc = imap_exec_msgset (idata, "UID COPY", mmbox, M_DELETED, 0, 0); ++ rc = imap_exec_msgset (idata, "UID COPY", mmbox, M_EXPIRED, 0, 0); + if (!rc) { + dprint (1, (debugfile, "imap_copy_messages: No messages del-tagged\n")); + rc = -1; @@ -63,8 +74,6 @@ index f08b4ea..47a8035 100644 + + return 1; +} -diff --git a/imap/imap.h b/imap/imap.h -index 74d7e13..99cd454 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -72,4 +72,7 @@ void imap_keepalive (void); @@ -75,11 +84,9 @@ index 74d7e13..99cd454 100644 +int imap_fast_trash(); + #endif -diff --git a/mx.c b/mx.c -index 78aafcc..38c4e7f 100644 --- a/mx.c +++ b/mx.c -@@ -828,6 +828,11 @@ static int trash_append (CONTEXT *ctx) +@@ -802,6 +802,11 @@ static int trash_append (CONTEXT *ctx) && stc.st_dev == st.st_dev && stc.st_rdev == st.st_rdev) return 0; /* we are in the trash folder: simple sync */