]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei_saved_search: show errno on ->flush failure
authorEric Wong <e@80x24.org>
Sat, 7 Jun 2025 19:48:36 +0000 (19:48 +0000)
committerEric Wong <e@80x24.org>
Mon, 9 Jun 2025 23:55:29 +0000 (23:55 +0000)
->flush failures need to describe the nature of the
failure, not just the failing handle.

lib/PublicInbox/LeiSavedSearch.pm

index 574cf9aa89ec570c90faa822e7e3adb0e321d35b..aed8b0c9c4fa00aeb2d951e446da9322c4414c4b 100644 (file)
@@ -89,7 +89,7 @@ sub list {
                my $p = "$lss_dir/$d/lei.saved-search";
                say $fh "\tpath = ", cquote_val($p) if -f $p;
        }
-       $fh->flush or die "flush: $fh";
+       $fh->flush or die "$fh->flush: $!";
        my $cfg = $lei->cfg_dump($fh->filename);
        my $out = $cfg ? $cfg->get_all('lei.q.output') : [];
        s!$LOCAL_PFX!! for @$out;