diff options
| author | apnadkarni <apnmbx-wits@yahoo.com> | 2023-10-04 09:02:27 (GMT) |
|---|---|---|
| committer | apnadkarni <apnmbx-wits@yahoo.com> | 2023-10-04 09:02:27 (GMT) |
| commit | 6a7c03014a876e280e451e8070af21e057fb55b6 (patch) | |
| tree | 5aa8ab78fe51187882aa5b28a7e6ef95d2ea2f51 /generic/tclFileName.c | |
| parent | 13bccc613010fcef78026aa046fe0a888e0c01d5 (diff) | |
| parent | 0783fdffc6987e4aa29d3f7a5765d2b3d5452bc9 (diff) | |
| download | tcl-6a7c03014a876e280e451e8070af21e057fb55b6.zip tcl-6a7c03014a876e280e451e8070af21e057fb55b6.tar.gz tcl-6a7c03014a876e280e451e8070af21e057fb55b6.tar.bz2 | |
Fix [9e039ee0b9], [57f144c799] and other zipfs glob issues.
Diffstat (limited to 'generic/tclFileName.c')
| -rw-r--r-- | generic/tclFileName.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c index ac0dfa3..f23b468 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -1399,11 +1399,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(Tcl_GetString(pathOrDir), "\\/") == NULL) { + const char *temp = Tcl_GetString(pathOrDir); + if (strpbrk(temp, "\\/") == NULL) { Tcl_AppendToObj(pathOrDir, last-1, 1); + } else if (!strcmp(temp, "//zipfs:")) { + Tcl_AppendToObj(pathOrDir, "/", 1); } } |
