summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-06-25 11:55:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-06-25 11:55:46 (GMT)
commit01eab1b3890706a987bfd038c2193a060660d823 (patch)
tree91f1e0c532b8d1c59a5a307206b833c245b68140 /generic
parentbc7ed66ad757475d649f77ef0a52c71966b8c42a (diff)
parent3b5f5de0a5c31cd0891ca0398b8573ce3e7111b8 (diff)
downloadtcl-01eab1b3890706a987bfd038c2193a060660d823.zip
tcl-01eab1b3890706a987bfd038c2193a060660d823.tar.gz
tcl-01eab1b3890706a987bfd038c2193a060660d823.tar.bz2
merge 8.5
Diffstat (limited to 'generic')
-rw-r--r--generic/tclFileName.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 4c57256..a6bb932 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -414,9 +414,17 @@ TclpGetNativePathType(
}
#endif
if (path[0] == '/') {
+#ifdef __CYGWIN__
+ /*
+ * Check for Cygwin // network path prefix
+ */
+ if (path[1] == '/') {
+ path++;
+ }
+#endif
if (driveNameLengthPtr != NULL) {
/*
- * We need this addition in case the QNX code was used.
+ * We need this addition in case the QNX or Cygwin code was used.
*/
*driveNameLengthPtr = (1 + path - origPath);
@@ -643,11 +651,20 @@ SplitUnixPath(
}
#endif
- if (path[0] == '/') {
- Tcl_ListObjAppendElement(NULL, result, Tcl_NewStringObj("/",1));
- p = path+1;
- } else {
- p = path;
+ p = path;
+ if (*p == '/') {
+ Tcl_Obj *rootElt = Tcl_NewStringObj("/", 1);
+ p++;
+#ifdef __CYGWIN__
+ /*
+ * Check for Cygwin // network path prefix
+ */
+ if (*p == '/') {
+ Tcl_AppendToObj(rootElt, "/", 1);
+ p++;
+ }
+#endif
+ Tcl_ListObjAppendElement(NULL, result, rootElt);
}
/*