summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/texlive/updmap.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-06-07 16:36:59 +0000
committerKarl Berry <karl@freefriends.org>2019-06-07 16:36:59 +0000
commit270a8309e5c8563d1b8802752bb4f9da84a072c4 (patch)
tree4944563e1d99f3253d0037ecfe28dacb598f1c4b /Master/texmf-dist/scripts/texlive/updmap.pl
parentee27e7422d51ea373b95ecf55d1ff93880e2bf89 (diff)
(read_map_files): quotemeta (\Q...\E) the map
name, in case it contains Perl escape sequences, as in "\Users". Also, if the map name already begins with a /, don't check for another one. Although absolute names are not needed or desirable, no need for gratuitious failure. Original report from Keks Dose, 18 Apr 2019 18:22:04. git-svn-id: svn://tug.org/texlive/trunk@51338 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/texlive/updmap.pl')
-rwxr-xr-xMaster/texmf-dist/scripts/texlive/updmap.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/Master/texmf-dist/scripts/texlive/updmap.pl b/Master/texmf-dist/scripts/texlive/updmap.pl
index aa23c959cde..33701201971 100755
--- a/Master/texmf-dist/scripts/texlive/updmap.pl
+++ b/Master/texmf-dist/scripts/texlive/updmap.pl
@@ -2075,7 +2075,12 @@ sub read_map_files {
my @fullpath = `kpsewhich --format=map @maps`;
chomp @fullpath;
foreach my $map (@maps) {
- my ($ff) = grep /\/$map(\.map)?$/, @fullpath;
+ # in case they give an absolute path (not needed/desired, but ...);
+ # Windows not supported.
+ my $dirsep = ($map =~ m!^/!) ? "" : "/";
+ # quotemeta the map string to avoid perl regexp warning, e.g.,
+ # if map name contains "\Users", the "\U" should be literal.
+ my ($ff) = grep /$dirsep\Q$map\E(\.map)?$/, @fullpath;
if ($ff) {
$alldata->{'maps'}{$map}{'fullpath'} = $ff;
} else {