From: Tim Henigan Date: Sat, 17 Mar 2012 14:18:58 GMT Subject: Re: [PATCH 7/9] difftool: teach difftool to handle directory diffs Message-ID: In-Reply-To: On Fri, Mar 16, 2012 at 11:08 PM, David Aguilar wrote: > On Fri, Mar 16, 2012 at 6:59 PM, Tim Henigan wrote: >> +       # Setup temp directories >> +       my $tmpdir = tempdir('/tmp/git-diffall.XXXXX', CLEANUP => 1); > > Is it okay to hardcode /tmp here, or should we instead do something like this?: > >    my $tmp = $ENV{TMPDIR} || '/tmp'; This could be done better. Based on the documentation [1], it appears that the proper way to do this is: my $tmpdir = tempdir('git-diffall.XXXXX', CLEANUP => 1, TMPDIR => 1); Adding 'TMPDIR => 1' is the equivalent of commanding the tmp dir to be created in 'File::Spec->tmpdir' [2]. I will try this out and send a v2 patch. [1]: http://perldoc.perl.org/File/Temp.html [2]: http://perldoc.perl.org/File/Spec.html