summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2020-07-18 18:06:30 (GMT)
committerkjnash <k.j.nash@usa.net>2020-07-18 18:06:30 (GMT)
commitd12eb85c8fe92ca27b4f03950a447068c2418cb8 (patch)
tree37dcf3693f4eaa716f142503fad684ca4f3f9112 /library
parent201d01f9da1f2fb006cc4c0fc265e552cf9c2703 (diff)
downloadtcl-d12eb85c8fe92ca27b4f03950a447068c2418cb8.zip
tcl-d12eb85c8fe92ca27b4f03950a447068c2418cb8.tar.gz
tcl-d12eb85c8fe92ca27b4f03950a447068c2418cb8.tar.bz2
Simplify case analysis in safe::AliasGlob
Diffstat (limited to 'library')
-rw-r--r--library/safe.tcl7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/safe.tcl b/library/safe.tcl
index da6523c..f0a14a3 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -820,6 +820,13 @@ proc ::safe::AliasGlob {slave args} {
} else {
lappend cmd -directory $dir
}
+ } else {
+ # The code after this "if ... else" block would conspire to return with
+ # no results in this case, if it were allowed to proceed. Instead,
+ # return now and reduce the number of cases to be considered later.
+ Log $slave {option -directory must be supplied}
+ if {$got(-nocomplain)} return
+ return -code error "permission denied"
}
# Apply the -join semantics ourselves.