From 72b151226a2c39b0f1c2264a60f3291b10425e1b Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Tue, 6 Nov 2018 21:31:03 +0000 Subject: tltcl.tcl: fixing a bugfix git-svn-id: svn://tug.org/texlive/trunk@49094 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/TeXLive/tltcl.tcl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Master/tlpkg/TeXLive/tltcl.tcl b/Master/tlpkg/TeXLive/tltcl.tcl index 72b16adbb88..75e9c12e724 100644 --- a/Master/tlpkg/TeXLive/tltcl.tcl +++ b/Master/tlpkg/TeXLive/tltcl.tcl @@ -94,13 +94,15 @@ proc load_translations {} { } if [catch {open [file join $d "tlmgr" "config"] r} fid] continue while 1 { + if [chan eof $fid] { + break + } if [catch {chan gets $fid} l] break if {[regexp {^\s*gui-lang\s*=\s*(\S+)$} $l m ::lang]} { - chan close $fid break } - if [chan eof $fid] break } + chan close $fid if {[info exists ::lang] && $::lang ne ""} break } } @@ -144,6 +146,7 @@ proc load_translations {} { set msgid "" set msgstr "" while 1 { + if [chan eof $fid] break if [catch {chan gets $fid} l] break if [regexp {^\s*#} $l] continue if [regexp {^\s*$} $l] { @@ -191,7 +194,6 @@ proc load_translations {} { set inmsgstr 1 set inmsgid 0 } - if [chan eof $fid] break } chan close $fid } -- cgit v1.2.3