From 8745ea9056cb2e68717bec2b56317ab67992a23b Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Fri, 28 May 2010 05:03:56 +0000 Subject: allow to edit/create not existing conf file which will be created on the go git-svn-id: svn://tug.org/texlive/trunk@18544 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/TLConfFile.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'Master/tlpkg/TeXLive/TLConfFile.pm') 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 = ; + chomp(@data); + close(CFG); } - my @data = ; - chomp(@data); - close(CFG); my %config = (); $config{'file'} = $file; -- cgit v1.2.3