]> Sergey Matveev's repositories - public-inbox.git/commitdiff
ssoma-replay: use TMPDIR for temporary path
authorEric Wong <e@80x24.org>
Fri, 20 May 2016 22:35:16 +0000 (22:35 +0000)
committerEric Wong <e@80x24.org>
Fri, 20 May 2016 22:35:16 +0000 (22:35 +0000)
Otherwise, tempfile() will use the current working directory,
which may not be writable.

scripts/ssoma-replay

index bfcea0a3c366cf9833a6c603c5391750387e23f8..91c121dd2f0e3eda8b1232d8c8cdfbab325ec8d7 100755 (executable)
@@ -29,7 +29,7 @@ use strict;
 use Email::Simple;
 use URI::Escape qw/uri_escape_utf8/;
 use File::Temp qw/tempfile/;
-my ($fh, $filename) = tempfile('pi-replay-XXXXXXXX');
+my ($fh, $filename) = tempfile('ssoma-replay-XXXXXXXX', TMPDIR => 1);
 my $msg = eval {
        local $/;
        Email::Simple->new(<STDIN>);