summaryrefslogtreecommitdiffstats
path: root/generic/tclFileName.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-10-04 16:01:57 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-10-04 16:01:57 (GMT)
commitf852823f2d4d5f92dee67e03cbdc4da22d8be30b (patch)
tree593e2656e33a3906d65c33734840fbb1b9bae6e4 /generic/tclFileName.c
parent3f371a5084c05daba396645abd9a25deb3d023d1 (diff)
parent49c9b2444c871d10db7b756b17827f435d5f96d1 (diff)
downloadtcl-f852823f2d4d5f92dee67e03cbdc4da22d8be30b.zip
tcl-f852823f2d4d5f92dee67e03cbdc4da22d8be30b.tar.gz
tcl-f852823f2d4d5f92dee67e03cbdc4da22d8be30b.tar.bz2
TIP 402: General Platform UNC Support
Diffstat (limited to 'generic/tclFileName.c')
-rw-r--r--generic/tclFileName.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 9620f8c..b553621 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -413,7 +413,6 @@ TclpGetNativePathType(
if (path[0] == '/') {
++path;
-#if defined(__CYGWIN__) || defined(__QNX__)
/*
* Check for "//" network path prefix
*/
@@ -422,22 +421,10 @@ TclpGetNativePathType(
while (*path && *path != '/') {
++path;
}
-#if defined(__CYGWIN__)
- /* UNC paths need to be followed by a share name */
- if (*path++ && (*path && *path != '/')) {
- ++path;
- while (*path && *path != '/') {
- ++path;
- }
- } else {
- path = origPath + 1;
- }
-#endif
}
-#endif
if (driveNameLengthPtr != NULL) {
/*
- * We need this addition in case the QNX or Cygwin code was used.
+ * We need this addition in case the "//" code was used.
*/
*driveNameLengthPtr = (path - origPath);
@@ -656,7 +643,6 @@ SplitUnixPath(
if (*path == '/') {
Tcl_Obj *rootElt;
++path;
-#if defined(__CYGWIN__) || defined(__QNX__)
/*
* Check for "//" network path prefix
*/
@@ -665,19 +651,7 @@ SplitUnixPath(
while (*path && *path != '/') {
++path;
}
-#if defined(__CYGWIN__)
- /* UNC paths need to be followed by a share name */
- if (*path++ && (*path && *path != '/')) {
- ++path;
- while (*path && *path != '/') {
- ++path;
- }
- } else {
- path = origPath + 1;
- }
-#endif
}
-#endif
rootElt = Tcl_NewStringObj(origPath, path - origPath);
Tcl_ListObjAppendElement(NULL, result, rootElt);
while (*path == '/') {