aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tclsqlite.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index af0d27b1f..36459e4a9 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -4037,9 +4037,12 @@ static const char *tclsh_main_loop(void){
"if {[file exists $arg]} {\n"
"lappend new $arg\n"
"} else {\n"
+ "set once 0\n"
"foreach match [lsort [glob -nocomplain $arg]] {\n"
"lappend new $match\n"
+ "set once 1\n"
"}\n"
+ "if {!$once} {lappend new $arg}\n"
"}\n"
"}\n"
"set argv $new\n"