diff options
Diffstat (limited to 'Master/tlpkg/TeXLive/TLPDB.pm')
-rw-r--r-- | Master/tlpkg/TeXLive/TLPDB.pm | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Master/tlpkg/TeXLive/TLPDB.pm b/Master/tlpkg/TeXLive/TLPDB.pm index 0670a64c6f8..78cbe489323 100644 --- a/Master/tlpkg/TeXLive/TLPDB.pm +++ b/Master/tlpkg/TeXLive/TLPDB.pm @@ -99,7 +99,7 @@ use TeXLive::TLConfig qw($CategoriesRegexp $DefaultCategory $InfraLocation use TeXLive::TLCrypto; use TeXLive::TLPOBJ; use TeXLive::TLUtils qw(dirname mkdirhier member win32 info log debug ddebug - tlwarn basename download_file merge_into tldie); + tlwarn basename download_file merge_into tldie system_pipe); use TeXLive::TLWinGoo; use Cwd 'abs_path'; @@ -316,11 +316,6 @@ sub from_file { ($tlpdbfh, $tlpdbfile) = TeXLive::TLUtils::tl_tmpfile(); # same as above close($tlpdbfh); - my $tlpdbfile_quote = $tlpdbfile; - if (win32()) { - $tlpdbfile =~ s!/!\\!g; - } - $tlpdbfile_quote = "\"$tlpdbfile\""; # if we have xz available we try the xz file my $xz_succeeded = 0 ; my $compressorextension = "<UNSET>"; @@ -328,12 +323,7 @@ sub from_file { # we first try the xz compressed file my ($xzfh, $xzfile) = TeXLive::TLUtils::tl_tmpfile(); close($xzfh); - my $xzfile_quote = $xzfile; - if (win32()) { - $xzfile =~ s!/!\\!g; - } - $xzfile_quote = "\"$xzfile\""; - my $decompressor = TeXLive::TLUtils::quotify_path_with_spaces($::progs{$DecompressorProgram{$DefaultCompressorFormat}}); + my $decompressor = $::progs{$DecompressorProgram{$DefaultCompressorFormat}}; $compressorextension = $CompressorExtension{$DefaultCompressorFormat}; my @decompressorArgs = @{$DecompressorArgs{$DefaultCompressorFormat}}; debug("trying to download $path.$compressorextension to $xzfile\n"); @@ -345,12 +335,10 @@ sub from_file { # xz *hopefully* returns 0 on success and anything else on failure # we don't have to negate since not zero means error in the shell # and thus in perl true - if (system("$decompressor @decompressorArgs <$xzfile_quote >$tlpdbfile_quote")) { + if (!system_pipe($decompressor, $xzfile, $tlpdbfile, 1, @decompressorArgs)) { debug("$decompressor $xzfile failed, trying plain file\n"); - # to be sure we unlink the xz file and the tlpdbfile - unlink($xzfile); + unlink($xzfile); # the above command only removes in case of success } else { - unlink($xzfile); $xz_succeeded = 1; debug("found the uncompressed $DefaultCompressorFormat file\n"); } |