diff options
author | Norbert Preining <preining@logic.at> | 2008-09-12 21:31:39 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2008-09-12 21:31:39 +0000 |
commit | b3429a0ced376a6842322dae0084ef2565ec31c4 (patch) | |
tree | c44cb1531537c1613b1a78dac625a6df82184b5c /Master | |
parent | d6ab099e01fe7aabd93c1741a72d57e7d748cd03 (diff) |
try to call abs_path only for real paths, not for URLs.
git-svn-id: svn://tug.org/texlive/trunk@10579 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rwxr-xr-x | Master/texmf/scripts/texlive/tlmgr.pl | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl index 70ac449209e..7a56b4dc1da 100755 --- a/Master/texmf/scripts/texlive/tlmgr.pl +++ b/Master/texmf/scripts/texlive/tlmgr.pl @@ -850,11 +850,13 @@ sub action_option { if ($loc =~ m/^ctan$/i) { $loc = "$TeXLive::TLConfig::TeXLiveURL"; } - # normalize the path - my $testloc = abs_path($loc); - # however, if we were given a url, that will get "normalized" to the - # empty string, it not being a path. Restore the original value if so. - $loc = $testloc if $testloc; + if ($loc !~ m!^(http|ftp)://!i) { + # seems to be a local path, try to normalize it + my $testloc = abs_path($loc); + # however, if we were given a url, that will get "normalized" to the + # empty string, it not being a path. Restore the original value if so. + $loc = $testloc if $testloc; + } info("tlmgr: setting default installation location to $loc\n"); $localtlpdb->option_location($loc); $localtlpdb->save; @@ -1057,12 +1059,13 @@ sub init_local_db { if (!defined($location)) { die("No installation source found, nor in the texlive.tlpdb nor on the cmd line.\nPlease specify one!"); } - # normalize the location - my $abs_location = abs_path($location); - - # however, if we were given a url, that will get "normalized" to the - # empty string, it not being a path. Restore the original value if so. - $location = $abs_location if $abs_location; + if ($location !~ m!^(http|ftp)://!i) { + # seems to be a local path, try to normalize it + my $testloc = abs_path($location); + # however, if we were given a url, that will get "normalized" to the + # empty string, it not being a path. Restore the original value if so. + $location = $testloc if $testloc; + } } sub action_gui { |