From: Adeodato Simó Date: Tue, 31 Jan 2006 00:23:28 +0000 (+0100) Subject: mutt (1.5.9-2sarge1) stable; urgency=low X-Git-Tag: 1.5.9-2sarge1 X-Git-Url: https://git.llucax.com/software/mutt-debian.git/commitdiff_plain/ed58a90a3935cdc925786acdc46a89f7e5ff8403?ds=inline;hp=-c mutt (1.5.9-2sarge1) stable; urgency=low * For attachments marked for deletion after the message is sent, don't remove them if the message is finally cancelled, or if the attachments are dropped from the message prior to sending. (Closes: #332972) --- ed58a90a3935cdc925786acdc46a89f7e5ff8403 diff --git a/debian/changelog b/debian/changelog index fffbe96..4bc972e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +mutt (1.5.9-2sarge1) stable; urgency=low + + * For attachments marked for deletion after the message is sent, don't + remove them if the message is finally cancelled, or if the attachments + are dropped from the message prior to sending. (Closes: #332972) + + -- Adeodato Simó Tue, 31 Jan 2006 01:23:28 +0100 + mutt (1.5.9-2) unstable; urgency=high * Added a missing Build-Depend on mawk. (Closes: #310039) diff --git a/upstream/patches/dont-delete-precious-attachments b/upstream/patches/dont-delete-precious-attachments new file mode 100644 index 0000000..8d08705 --- /dev/null +++ b/upstream/patches/dont-delete-precious-attachments @@ -0,0 +1,57 @@ +--- mutt/ChangeLog ++++ mutt/ChangeLog +@@ -1,3 +1,16 @@ ++2005-08-04 01:15:52 brendan (brendan) ++ ++ * compose.c: Don't unlink non-mutt files that would have been ++ unlinked on send if the message is cancelled. ++ ++2005-08-02 18:15:33 Brendan Cully (brendan) ++ ++ * compose.c, mutt.h: In compose menu, detach should be able to ++ unlink files generated by mutt, but not files that existed before. ++ ++ * compose.c: Don't unlink attachments that you've decided not ++ to send. (closes #1328) ++ + 2005-04-10 09:37:51 Johan Svedberg (roessler) + + * po/sv.po: update +--- mutt/mutt.h 1 Aug 2005 07:35:04 -0000 3.45 ++++ mutt/mutt.h 2 Aug 2005 14:39:56 -0000 3.46 +@@ -855,6 +855,7 @@ typedef struct attachptr + char *tree; + int level; + int num; ++ unsigned int unowned : 1; /* don't unlink on detach */ + } ATTACHPTR; + + typedef struct +--- mutt/compose.c 3 Feb 2005 17:01:42 -0000 3.22 ++++ mutt/compose.c 4 Aug 2005 01:15:52 -0000 3.25 +@@ -686,6 +686,7 @@ int mutt_compose_menu (HEADER *msg, /* + { + char *att = files[i]; + idx[idxlen] = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR)); ++ idx[idxlen]->unowned = 1; + idx[idxlen]->content = mutt_make_file_attach (att); + if (idx[idxlen]->content != NULL) + update_idx (menu, idx, idxlen++); +@@ -814,6 +815,8 @@ int mutt_compose_menu (HEADER *msg, /* + + case OP_DELETE: + CHECK_COUNT; ++ if (idx[menu->current]->unowned) ++ idx[menu->current]->content->unlink = 0; + if (delete_attachment (menu, &idxlen, menu->current) == -1) + break; + mutt_update_tree (idx, idxlen); +@@ -1143,6 +1146,8 @@ int mutt_compose_menu (HEADER *msg, /* + /* avoid freeing other attachments */ + idx[idxlen]->content->next = NULL; + idx[idxlen]->content->parts = NULL; ++ if (idx[idxlen]->unowned) ++ idx[idxlen]->content->unlink = 0; + mutt_free_body (&idx[idxlen]->content); + FREE (&idx[idxlen]->tree); + FREE (&idx[idxlen]);