summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2020-10-25 15:21:11 -0400
committerKyle Meyer <kyle@kyleam.com>2020-10-25 22:23:32 -0400
commit524862221a0928ef707cb5ab91cea8cf50bc3168 (patch)
tree2d8c166374bad52cce2387b474746fc4b6a0a63e
parent442472a37da221c7c5f961870a2b6b53b1c18e81 (diff)
downloadpiem-524862221a0928ef707cb5ab91cea8cf50bc3168.tar.gz
b4: Remove temporary directory on "missing mbox" error
As of 30defdb (b4: Clean up temporary directories by default, 2020-09-27), piem-b4-am-from-mid is supposed to clean up its temporary directory unless piem-b4-keep-temp-directory is non-nil. That commit, however, missed an error case where the cleanup function needs to be triggered. Message-Id: <20201025192111.27439-1-kyle@kyleam.com>
-rw-r--r--piem-b4.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/piem-b4.el b/piem-b4.el
index 31bf6f1..27ecf19 100644
--- a/piem-b4.el
+++ b/piem-b4.el
@@ -101,6 +101,8 @@ This is intended to be used for debugging purposes.")
mbox-cover)
(if (file-exists-p mbox-am)
mbox-am
+ (when clean-fn
+ (funcall clean-fn))
(error "Expected mbox file does not exist: %s" mbox-am))
clean-fn))))