diff options
author | joeyh <joeyh> | 2007-06-25 20:10:35 +0000 |
---|---|---|
committer | joeyh <joeyh> | 2007-06-25 20:10:35 +0000 |
commit | 1d7165266b9f24feeabf1480dc68e7ea6114a718 (patch) | |
tree | c0038dba5df2096adaf6b58a34cda4492690e353 | |
parent | 058c192993796e007353506873611d110bf613d0 (diff) | |
download | moreutils-1d7165266b9f24feeabf1480dc68e7ea6114a718.tar.gz |
* vidir, zrun: Don't put temp files in the current directory. Closes: #429367
-rw-r--r-- | debian/changelog | 6 | ||||
-rwxr-xr-x | vidir | 3 | ||||
-rwxr-xr-x | zrun | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index c856224..ced9aa0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +moreutils (0.22) unstable; urgency=low + + * vidir, zrun: Don't put temp files in the current directory. Closes: #429367 + + -- Joey Hess <joeyh@debian.org> Mon, 25 Jun 2007 16:08:14 -0400 + moreutils (0.21) unstable; urgency=low * Patch from Sergej Pupykin fixing ifdata -pN. @@ -60,6 +60,7 @@ Licensed under the GNU GPL. =cut +use File::Spec; use File::Temp; use Getopt::Long; @@ -90,7 +91,7 @@ foreach my $item (@ARGV) { } } -my $tmp=File::Temp->new(template => "dirXXXXX"); +my $tmp=File::Temp->new(TEMPLATE => "dirXXXXX", DIR => File::Spec->tmpdir); open (OUT, ">".$tmp->filename) || die "$0: cannot write ".$tmp->filename.": $!\n"; my %item; @@ -32,6 +32,7 @@ Copyright 2006 by Chung-chieh Shan <ccshan@post.harvard.edu> use warnings; use strict; use IO::Handle; +use File::Spec; use File::Temp qw{tempfile}; my $program = shift; @@ -47,7 +48,8 @@ foreach my $argument (@ARGV) { my $suffix = "-$2"; my @preprocess = $3 eq "bz2" ? qw(bzip2 -d -c) : qw(gzip -d -c); - my ($fh, $tmpname) = tempfile(SUFFIX => $suffix, UNLINK => 1) + my ($fh, $tmpname) = tempfile(SUFFIX => $suffix, + DIR => File::Spec->tmpdir, UNLINK => 1) or die "zrun: cannot create temporary file: $!\n"; if (my $child = fork) { |