From 0895a4204849575663399a4a569f5145ca07c53a Mon Sep 17 00:00:00 2001 From: Reinhard Kotucha Date: Wed, 8 Jun 2011 18:58:09 +0000 Subject: updmap.pl: strip trailing spaces from config file git-svn-id: svn://tug.org/texlive/trunk@22869 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/tetex/updmap.pl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Build') diff --git a/Build/source/texk/tetex/updmap.pl b/Build/source/texk/tetex/updmap.pl index 407bac9e082..a1df217237a 100755 --- a/Build/source/texk/tetex/updmap.pl +++ b/Build/source/texk/tetex/updmap.pl @@ -462,8 +462,12 @@ sub cfgval { if ($#cfg < 0) { open FILE, "<$cnfFile" or die "can't open configuration file $cnfFile: $!"; - @cfg = ; + while () { + s/\s*$//; # strip trailing spaces + push @cfg, $_; + } close FILE; + chomp (@cfg); } for my $line (@cfg) { if ($line =~ m/^\s*${variable}[\s=]+(.*)\s*$/) { @@ -573,7 +577,6 @@ sub locateMap { my @maps = @_; my @files; - chomp @maps; return @maps if ($#maps < 0); @files = `kpsewhich --format=map @maps`; @@ -581,7 +584,7 @@ sub locateMap { foreach my $map (@maps) { push @missing, $map if (! grep /\/$map$/, @files); - } + } if (wantarray) { return @files; } -- cgit v1.2.3