summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xMaster/texmf/scripts/texlive/tlmgr.pl8
-rw-r--r--Master/tlpkg/TeXLive/TLConfFile.pm10
2 files changed, 8 insertions, 10 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgr.pl b/Master/texmf/scripts/texlive/tlmgr.pl
index 6c76511fa1b..d6dd8f77d69 100755
--- a/Master/texmf/scripts/texlive/tlmgr.pl
+++ b/Master/texmf/scripts/texlive/tlmgr.pl
@@ -4074,14 +4074,10 @@ sub action_conf {
if ($arg eq "tlmgr") {
chomp (my $TEXMFCONFIG = `kpsewhich -var-value=TEXMFCONFIG`);
$fn = "$TEXMFCONFIG/tlmgr/config";
- if (-r $fn) {
- $cf = TeXLive::TLConfFile->new($fn, "#", "=");
- }
+ $cf = TeXLive::TLConfFile->new($fn, "#", "=");
} else {
$fn = "$Master/texmf.cnf";
- if (-r $fn) {
- $cf = TeXLive::TLConfFile->new($fn, "[%#]", "=");
- }
+ $cf = TeXLive::TLConfFile->new($fn, "[%#]", "=");
}
my ($key, $val) = @ARGV;
if (!defined($key)) {
diff --git a/Master/tlpkg/TeXLive/TLConfFile.pm b/Master/tlpkg/TeXLive/TLConfFile.pm
index 17233ca201f..01567d602b2 100644
--- a/Master/tlpkg/TeXLive/TLConfFile.pm
+++ b/Master/tlpkg/TeXLive/TLConfFile.pm
@@ -237,12 +237,14 @@ sub save
#
sub parse_config_file {
my ($file, $cc, $sep) = @_;
+ my @data;
if (!open(CFG, "<$file")) {
- return;
+ @data = ();
+ } else {
+ @data = <CFG>;
+ chomp(@data);
+ close(CFG);
}
- my @data = <CFG>;
- chomp(@data);
- close(CFG);
my %config = ();
$config{'file'} = $file;