summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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.