summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2011-01-06 12:20:30 +0000
committerNorbert Preining <preining@logic.at>2011-01-06 12:20:30 +0000
commita48a185a1221edaddaeae01a91ae2f2171edceeb (patch)
tree177e31b94c41da43bf8222b66310fab907ba3095
parent212770f854dc8dd5f5e3adf3ac946c203ffebb76 (diff)
don't use cat, use open and <> for reading the contents of taxonomy file
windows does not have cat git-svn-id: svn://tug.org/texlive/trunk@20952 c570f23f-e606-0410-a88d-b1316a301751
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl9
1 files changed, 8 insertions, 1 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index e1b607bc5de..659c1e42609 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -1183,7 +1183,14 @@ sub load_taxonomy_datafile {
tlwarn("tlmgr: taxonomy file $fpath not readable.\n");
return;
}
- my $foo = `cat $fpath`;
+ if (!open (TAXF, $fpath)) {
+ tlwarn("tlmgr: taxonomy file $fpath cannot be opened.\n");
+ return;
+ }
+ # suck in the whole file contents
+ my @foo = <TAXF>;
+ close(TAXF);
+ my $foo = "@foo";
no strict "vars";
# the no strict "vars" is *ABSOLUTELY* necessary otherwise the file is
# not evaluated, no idea why!