diff options
author | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-22 08:16:22 +0000 |
---|---|---|
committer | Eric Wong (Contractor, The Linux Foundation) <e@80x24.org> | 2018-03-22 08:16:22 +0000 |
commit | 4a560eccced6e5dd4abdf7732687ec126acdea45 (patch) | |
tree | 553d20da872d7c68b5d72423faf99b62ba28013b | |
parent | 641d171a6bcb1f4ebb87b317f8eaca825da501c1 (diff) | |
download | public-inbox-4a560eccced6e5dd4abdf7732687ec126acdea45.tar.gz |
The File::Temp API is a bit tricky and needs TMPDIR explicitly enabled if a template is given.
-rw-r--r-- | lib/PublicInbox/V2Writable.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 44b5528f..20c27363 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -432,10 +432,10 @@ sub diff ($$$) { use File::Temp qw(tempfile); use PublicInbox::Spawn qw(spawn); - my ($ah, $an) = tempfile('email-cur-XXXXXXXX'); + my ($ah, $an) = tempfile('email-cur-XXXXXXXX', TMPDIR => 1); print $ah $cur->as_string or die "print: $!"; close $ah or die "close: $!"; - my ($bh, $bn) = tempfile('email-new-XXXXXXXX'); + my ($bh, $bn) = tempfile('email-new-XXXXXXXX', TMPDIR => 1); PublicInbox::Import::drop_unwanted_headers($new); print $bh $new->as_string or die "print: $!"; close $bh or die "close: $!"; |