From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2676D1FAEF for ; Thu, 22 Mar 2018 09:40:18 +0000 (UTC) From: "Eric Wong (Contractor, The Linux Foundation)" To: meta@public-inbox.org Subject: [PATCH 12/13] v2writable: DEBUG_DIFF respects $TMPDIR Date: Thu, 22 Mar 2018 09:40:14 +0000 Message-Id: <20180322094015.14422-13-e@80x24.org> In-Reply-To: <20180322094015.14422-1-e@80x24.org> References: <20180322094015.14422-1-e@80x24.org> List-Id: The File::Temp API is a bit tricky and needs TMPDIR explicitly enabled if a template is given. --- lib/PublicInbox/V2Writable.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 44b5528..20c2736 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: $!"; -- EW