From 082cb4aeb2e74428e0b0298f9796dab53f2f28a8 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 10 Feb 2025 12:57:25 +0000 Subject: tcltest: avoid "couldn't read directory" error if no read permission on some child folder of "-testdir" parameter (GetMatchingDirectories will be invoked recursively, so nested glob would not fail with "permission denied") --- library/tcltest/tcltest.tcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl index 7dc75d7..c245394 100644 --- a/library/tcltest/tcltest.tcl +++ b/library/tcltest/tcltest.tcl @@ -2763,7 +2763,7 @@ proc tcltest::GetMatchingDirectories {rootdir} { foreach pattern [matchDirectories] { foreach path [glob -directory $rootdir -types d -nocomplain -- \ $pattern] { - if {$path ni $skipDirs} { + if {$path ni $skipDirs && [file readable $path]} { set matchDirs [concat $matchDirs [GetMatchingDirectories $path]] if {[file exists [file join $path all.tcl]]} { lappend matchDirs $path -- cgit v0.12