diff options
author | Brendan Cully <brendan@kublai.com> | 2005-08-02 14:39:56 +0000 |
---|---|---|
committer | Brendan Cully <brendan@kublai.com> | 2005-08-02 14:39:56 +0000 |
commit | 67daba7815137339bfb95c65db3a189f7193d4d5 (patch) | |
tree | c043bcf31283037f8fc016caf74fb73c4a09a9d1 /compose.c | |
parent | a9fb8d9f35df615b22b0119799bb8ce4c685ffcd (diff) |
In compose menu, detach should be able to unlink files generated by mutt,
but not files that existed before.
Diffstat (limited to 'compose.c')
-rw-r--r-- | compose.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -686,6 +686,7 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ { 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,7 +815,8 @@ int mutt_compose_menu (HEADER *msg, /* structure for new message */ case OP_DELETE: CHECK_COUNT; - idx[menu->current]->content->unlink = 0; + 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); |