summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {