From: Eric Wong Date: Sun, 10 Oct 2021 14:25:17 +0000 (+0000) Subject: lei/store: keep ".err-XXXX" in stderr tmpfile X-Git-Tag: v1.7.0~196 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=25e7cf6db84a2de9249b4a3dcc98d3514e30729a;p=public-inbox.git lei/store: keep ".err-XXXX" in stderr tmpfile This is slighly more meaningful since the file is already in ~/.local/share/lei/store, so "lei_store" was redundant (and the "XXXX" are random characters replaced by File::Temp) --- diff --git a/lib/PublicInbox/LeiStore.pm b/lib/PublicInbox/LeiStore.pm index 52a1456f..613d1d31 100644 --- a/lib/PublicInbox/LeiStore.pm +++ b/lib/PublicInbox/LeiStore.pm @@ -512,7 +512,7 @@ sub xchg_stderr { return unless -e $dir; my $old = delete $self->{-tmp_err}; my $pfx = POSIX::strftime('%Y%m%d%H%M%S', gmtime(time)); - my $err = File::Temp->new(TEMPLATE => "$pfx.$$.lei_storeXXXX", + my $err = File::Temp->new(TEMPLATE => "$pfx.$$.err-XXXX", SUFFIX => '.err', DIR => $dir); open STDERR, '>>', $err->filename or die "dup2: $!"; STDERR->autoflush(1); # shared with shard subprocesses