summaryrefslogtreecommitdiffstats
path: root/generic/tclFileName.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-10-04 09:28:58 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-10-04 09:28:58 (GMT)
commit5f31c1584bb26cb26de8eebe5a2bb4f434fc77a3 (patch)
treefad2aa87f1d6efc7c7e46aa0e2ceb0335c7ff662 /generic/tclFileName.c
parentf004d6f778d6f1bd7aad5f25479bcd81e27486fa (diff)
parent6a7c03014a876e280e451e8070af21e057fb55b6 (diff)
downloadtcl-5f31c1584bb26cb26de8eebe5a2bb4f434fc77a3.zip
tcl-5f31c1584bb26cb26de8eebe5a2bb4f434fc77a3.tar.gz
tcl-5f31c1584bb26cb26de8eebe5a2bb4f434fc77a3.tar.bz2
Merge 8.7 - Fix [9e039ee0b9], [57f144c799] and other zipfs glob issues.
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r--generic/tclFileName.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 8a58459..c8ace9c 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -1306,11 +1306,15 @@ Tcl_GlobObjCmd(
* We must ensure that we haven't cut off too much, and turned
* a valid path like '/' or 'C:/' into an incorrect path like
* '' or 'C:'. The way we do this is to add a separator if
- * there are none presently in the prefix.
+ * there are none presently in the prefix. Similar treatment
+ * for the zipfs volume.
*/
- if (strpbrk(TclGetString(pathOrDir), "\\/") == NULL) {
+ const char *temp = TclGetString(pathOrDir);
+ if (strpbrk(temp, "\\/") == NULL) {
Tcl_AppendToObj(pathOrDir, last-1, 1);
+ } else if (!strcmp(temp, "//zipfs:")) {
+ Tcl_AppendToObj(pathOrDir, "/", 1);
}
}