From 7c90f6c4f49259ca66071955ec9eb00db29b5fe8 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 6 Apr 2020 10:40:48 +0000 Subject: fixes for tmpdir handling - back out changes (besides typo fixes) in tl_tempdir - don't use pattern to File::Temp::tempdir in verify_checksum git-svn-id: svn://tug.org/texlive/trunk@54629 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLUtils.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 1a44ca9436e..ed99a4d2918 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -558,10 +558,7 @@ is terminated. sub tl_tmpdir { initialize_global_tmpdir() if (!defined($::tl_tmpdir)); - # fails on Windows? - #my $tmp = File::Temp::tempdir(DIR => $::tl_tmpdir, CLEANUP => 1); - # hopefully: - my $tmp = File::Temp::tempdir("$::tl_tmpdir/XXXXXXXXX", CLEANUP => 1); + my $tmp = File::Temp::tempdir(DIR => $::tl_tmpdir, CLEANUP => 1); ddebug("tl_tmpdir: creating tempdir $tmp\n"); return ($tmp); } @@ -2217,7 +2214,10 @@ sub check_file_and_remove { if ($tlchecksum ne $checksum) { tlwarn("TLUtils::check_file: checksums differ for $xzfile:\n"); tlwarn("TLUtils::check_file: tlchecksum=$tlchecksum, arg=$checksum\n"); - $check_file_tmpdir = File::Temp::tempdir("tlcheckfileXXXXXXXX"); + # on Windows passing a pattern creates the tmpdir in PWD + # which means that it will be tried to be created on the DVD + # $check_file_tmpdir = File::Temp::tempdir("tlcheckfileXXXXXXXX"); + $check_file_tmpdir = File::Temp::tempdir(); tlwarn("TLUtils::check_file: removing $xzfile, " . "but saving copy in $check_file_tmpdir\n"); copy($xzfile, $check_file_tmpdir); -- cgit v1.2.3