4 +2005-08-04 01:15:52 brendan (brendan)
6 + * compose.c: Don't unlink non-mutt files that would have been
7 + unlinked on send if the message is cancelled.
9 +2005-08-02 18:15:33 Brendan Cully <brendan@kublai.com> (brendan)
11 + * compose.c, mutt.h: In compose menu, detach should be able to
12 + unlink files generated by mutt, but not files that existed before.
14 + * compose.c: Don't unlink attachments that you've decided not
15 + to send. (closes #1328)
17 2005-04-10 09:37:51 Johan Svedberg <johan@svedberg.pp.se> (roessler)
20 --- mutt/mutt.h 1 Aug 2005 07:35:04 -0000 3.45
21 +++ mutt/mutt.h 2 Aug 2005 14:39:56 -0000 3.46
22 @@ -855,6 +855,7 @@ typedef struct attachptr
26 + unsigned int unowned : 1; /* don't unlink on detach */
30 --- mutt/compose.c 3 Feb 2005 17:01:42 -0000 3.22
31 +++ mutt/compose.c 4 Aug 2005 01:15:52 -0000 3.25
32 @@ -686,6 +686,7 @@ int mutt_compose_menu (HEADER *msg, /*
35 idx[idxlen] = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
36 + idx[idxlen]->unowned = 1;
37 idx[idxlen]->content = mutt_make_file_attach (att);
38 if (idx[idxlen]->content != NULL)
39 update_idx (menu, idx, idxlen++);
40 @@ -814,6 +815,8 @@ int mutt_compose_menu (HEADER *msg, /*
44 + if (idx[menu->current]->unowned)
45 + idx[menu->current]->content->unlink = 0;
46 if (delete_attachment (menu, &idxlen, menu->current) == -1)
48 mutt_update_tree (idx, idxlen);
49 @@ -1143,6 +1146,8 @@ int mutt_compose_menu (HEADER *msg, /*
50 /* avoid freeing other attachments */
51 idx[idxlen]->content->next = NULL;
52 idx[idxlen]->content->parts = NULL;
53 + if (idx[idxlen]->unowned)
54 + idx[idxlen]->content->unlink = 0;
55 mutt_free_body (&idx[idxlen]->content);
56 FREE (&idx[idxlen]->tree);