diff --git a/git-archimport.perl b/git-archimport.perl
index b7e24808ec5a666f96fe4db4e98795c71f880d68..2ed2e3c0650f42ab557811848c3838f1062487b8 100755 (executable)
--- a/git-archimport.perl
+++ b/git-archimport.perl
@ARGV >= 1 or usage();
my @arch_roots = @ARGV;
-my ($tmpdir, $tmpdirname) = tempdir('git-archimport-XXXXXX', TMPDIR => 1, CLEANUP => 1);
-my $tmp = $opt_t || 1;
-$tmp = tempdir('git-archimport-XXXXXX', TMPDIR => 1, CLEANUP => 1);
+$ENV{'TMPDIR'} = $opt_t if $opt_t; # $ENV{TMPDIR} will affect tempdir() calls:
+my $tmp = tempdir('git-archimport-XXXXXX', TMPDIR => 1, CLEANUP => 1);
$opt_v && print "+ Using $tmp as temporary directory\n";
my @psets = (); # the collection