discussion and development of piem
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: piem@inbox.kyleam.com
Subject: [PATCH] b4: Remove temporary directory on "missing mbox" error
Date: Sun, 25 Oct 2020 15:21:11 -0400	[thread overview]
Message-ID: <20201025192111.27439-1-kyle@kyleam.com> (raw)

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.
---
 piem-b4.el | 2 ++
 1 file changed, 2 insertions(+)

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 @@ (defun piem-b4--get-am-files (mid coderepo args)
                  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))))
 

base-commit: 442472a37da221c7c5f961870a2b6b53b1c18e81
-- 
2.28.0


                 reply	other threads:[~2020-10-25 19:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://git.kyleam.com/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201025192111.27439-1-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=piem@inbox.kyleam.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.kyleam.com/piem/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).