]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei/store: keep ".err-XXXX" in stderr tmpfile
authorEric Wong <e@80x24.org>
Sun, 10 Oct 2021 14:25:17 +0000 (14:25 +0000)
committerEric Wong <e@80x24.org>
Sun, 10 Oct 2021 23:29:55 +0000 (23:29 +0000)
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)

lib/PublicInbox/LeiStore.pm

index 52a1456fb41544e4bee7ad21c1a0f662bc59d13c..613d1d31f58136b53cd48533f7869e17522c5329 100644 (file)
@@ -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