From aaa3d6879a54492a4e73a1c485f5fc63aa1ea049 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Sat, 14 May 2016 00:31:00 +0000 Subject: tempdir rework: use consistently tl_tmpdir/tmpfile for debugging git-svn-id: svn://tug.org/texlive/trunk@41104 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLPDB.pm | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLPDB.pm') diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index b82d747c2bb..de483db5803 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -97,8 +97,6 @@ use TeXLive::TLUtils qw(dirname mkdirhier member win32 info log debug ddebug tlwarn basename download_file merge_into tldie); use TeXLive::TLWinGoo; -use File::Temp qw/tempfile/; - use Cwd 'abs_path'; my $_listdir; @@ -307,7 +305,7 @@ sub from_file { # on windows that doesn't work, so we close the fh immediately # this creates a short loophole, but much better than before anyway my $tlpdbfh; - ($tlpdbfh, $tlpdbfile) = tempfile(); + ($tlpdbfh, $tlpdbfile) = TeXLive::TLUtils::tl_tmpfile(); # same as above close($tlpdbfh); my $tlpdbfile_quote = $tlpdbfile; @@ -319,7 +317,7 @@ sub from_file { my $xz_succeeded = 0 ; if (defined($::progs{'xzdec'})) { # we first try the xz compressed file - my ($xzfh, $xzfile) = tempfile(); + my ($xzfh, $xzfile) = TeXLive::TLUtils::tl_tmpfile(); close($xzfh); my $xzfile_quote = $xzfile; if (win32()) { @@ -434,10 +432,7 @@ sub from_file { $self->{'verified'} = $is_verified; - # remove the xzdec-ed tlpdb file from temp dir - # THAT IS RACY!!! we should fix that in some better way with tempfile close($retfh); - unlink($tlpdbfile) if $tlpdbfile; return($found); } -- cgit v1.2.3