- done=armed_done;
- switch (setjmp(env)) {
- case OK:
- status = sendaux(vec, vecp, drft, st) ? NOTOK : OK;
- if (status == OK) {
- /* move original draft to +trash folder */
- /* temporary close stdin, for refile not to ask */
- dupfd = dup(0);
- close(0);
- if (execprogl("refile", "refile", "-file",
- original_draft, "+trash",
- (char *)NULL) != 0) {
- advise(NULL, "unable to trash the draft");
- }
- dup2(dupfd, 0);
- close(dupfd);
+ if ((status = sendaux(vec, vecp, drft, st)) == OK) {
+ /* move original draft to +trash folder */
+ /* temporary close stdin, for refile not to ask */
+ dupfd = dup(0);
+ close(0);
+ if (execprogl("refile", "refile", "-file",
+ original_draft, "+trash",
+ (char *)NULL) != 0) {
+ advise(NULL, "unable to trash the draft");