summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixFile.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixFile.c')
-rw-r--r--unix/tclUnixFile.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 7f9644b..86f3d33 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -254,6 +254,12 @@ Tcl_FindExecutable(argv0)
*/
p = ":/bin:/usr/bin";
+ } else if (*p == '\0') {
+ /*
+ * An empty path is equivalent to ".".
+ */
+
+ p = "./";
}
/*
@@ -286,8 +292,11 @@ Tcl_FindExecutable(argv0)
}
if (*p == 0) {
break;
+ } else if (*(p+1) == 0) {
+ p = "./";
+ } else {
+ p++;
}
- p++;
}
goto done;