From f477a01bac446954cbea3b58a3ceb69f4f876d7a Mon Sep 17 00:00:00 2001 From: Siep Kroonenberg Date: Sun, 16 Feb 2020 12:25:29 +0000 Subject: Real test for writability of directory rather than 'file writable' git-svn-id: svn://tug.org/texlive/trunk@53801 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/tlshell/tlshell.tcl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl index 66476199bb1..4ddc53509ea 100755 --- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl +++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl @@ -1,6 +1,6 @@ #!/usr/bin/env wish -# Copyright 2017-2019 Siep Kroonenberg +# Copyright 2017-2020 Siep Kroonenberg # This file is licensed under the GNU General Public License version 2 # or any later version. @@ -85,7 +85,7 @@ proc do_debug {s} { file mkdir ${::instroot}/temp set dbg [open "${::instroot}/temp/mydbglog" a] puts $dbg "TCL: $s" - close $dbg + chan close $dbg # Track debug output in the log dialog if it is running: if [winfo exists .tllg.dbg.tx] { .tllg.dbg.tx configure -state normal @@ -107,7 +107,7 @@ proc maketemp {ext} { # create empty file. although we just want a name, # we must make sure that it can be created. set fid [open $fname w] - close $fid + chan close $fid if {! [file exists $fname]} {error "Cannot create temporary file"} if {$::tcl_platform(platform) eq "unix"} { file attributes $fname -permissions 0600 @@ -2390,7 +2390,7 @@ proc initialize {} { populate_main # testing writablilty earlier led to sizing problems - if {! [file writable $::instroot]} { + if {! [dir_writable $::instroot]} { set ans [tk_messageBox -type yesno -icon warning -message \ [__ "%s is not writable. You can probably not do much. Are you sure you want to continue?" $::instroot]] -- cgit v1.2.3