diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-07-05 16:50:36 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-07-05 16:50:36 +0000 |
commit | b7efa0d4f4b4ecf5e8eb51d5aded4b7c4df58dd6 (patch) | |
tree | 7a0d2569aee4d232dcd6f404ec6bbc29c650d8f1 /Master/tlpkg/TeXLive | |
parent | 5209134cd9d89ac7808e5651bf530c736f2d7449 (diff) |
Adjustments to path display functions.
git-svn-id: svn://tug.org/texlive/trunk@19247 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/TeXLive')
-rw-r--r-- | Master/tlpkg/TeXLive/TLUtils.pm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/tlpkg/TeXLive/TLUtils.pm b/Master/tlpkg/TeXLive/TLUtils.pm index 525ee61430c..95f9fd3268a 100644 --- a/Master/tlpkg/TeXLive/TLUtils.pm +++ b/Master/tlpkg/TeXLive/TLUtils.pm @@ -89,6 +89,8 @@ C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure TeXLive::TLUtils::merge_into(\%to, \%from); TeXLive::TLUtils::texdir_check($texdir); TeXLive::TLUtils::conv_to_w32_path($path); + TeXLive::TLUtils::native_slashify($internal_path); + TeXLive::TLUtils::forward_slashify($path_from_user); TeXLive::TLUtils::give_ctan_mirror(); TeXLive::TLUtils::give_ctan_mirror_base(); TeXLive::TLUtils::tlmd5($path); @@ -139,6 +141,9 @@ BEGIN { &member "ewords &conv_to_w32_path + &native_slashify + &forward_slashify + &conv_to_w32_path &untar &merge_into &give_ctan_mirror @@ -3075,6 +3080,27 @@ sub conv_to_w32_path { return($p); } +=pod + +The next two functions are meant for user input/output in installer menus. +They help making the windows user happy by turning slashes into backslashes +before displaying a path, and our code happy by turning backslashes into forwars +slashes after reading a path. They both are no-ops on Unix. + +=cut + +sub native_slashify { + my ($r) = @_; + $r =~ s!/!\\!g if win32(); + return $r; +} + +sub forward_slashify { + my ($r) = @_; + $r =~ s!\\!/!g if win32(); + return $r; +} + =item C<setup_persistent_downloads()> Set up to use persistent connections using LWP/TLDownload. |