summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-03-19 22:32:42 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-03-19 22:40:44 -0700
commit61d1ba43f6c999dcd816a0fffaea5ac50f4df50a (patch)
treef7e0f5a990af0243f07d6930aeacc6aaa7bf629b
parentfb4110b5cd5bc924770671095c895c744aa15333 (diff)
downloadmailscripts-61d1ba43f6c999dcd816a0fffaea5ac50f4df50a.tar.gz
notmuch-slurp-debbug: die if Mail::Box::Manager::open fails
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--debian/changelog1
-rwxr-xr-xnotmuch-slurp-debbug4
2 files changed, 3 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 17a9ba6..bc91bd5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,7 @@ mailscripts (0.24-1) unstable; urgency=medium
- Support commenting out subscriptions.
- Cope with XML feeds sent with text/gemini MIME type.
* notmuch-extract-patch(1): add link to the piem project.
+ * notmuch-slurp-debbug: exit immediately if Mail::Box::Manager::open fails.
-- Sean Whitton <spwhitton@spwhitton.name> Fri, 07 Jan 2022 14:48:01 -0700
diff --git a/notmuch-slurp-debbug b/notmuch-slurp-debbug
index ad0db47..0130470 100755
--- a/notmuch-slurp-debbug
+++ b/notmuch-slurp-debbug
@@ -54,7 +54,7 @@ $maildir = $mgr->open(
access => "a",
keep_dups => 1,
type => "maildir"
-);
+) or die "failed to open target maildir: $!\n";
# we use bts(1) to download the mbox because it has some logic to find
# the right URI and the user might have enabled its caching features.
@@ -72,7 +72,7 @@ my $mbox = $mgr->open(
access => "r",
keep_dups => 1,
type => "mbox"
-);
+) or die "failed to open $bug.mbox: $!\n";
foreach my $message ($mbox->messages) {
my $mid = $message->messageId;