diff options
author | dgp <dgp@users.sourceforge.net> | 2012-06-25 11:55:46 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-06-25 11:55:46 (GMT) |
commit | 25caae00155b668549f912b4ed61f79a92c44a43 (patch) | |
tree | 91f1e0c532b8d1c59a5a307206b833c245b68140 /generic | |
parent | dd5bdcf5e936c8308f01b94ad6c1e53967b56ff0 (diff) | |
parent | 1b403491585909834fa1cdc86d326ed2d89f6710 (diff) | |
download | tcl-25caae00155b668549f912b4ed61f79a92c44a43.zip tcl-25caae00155b668549f912b4ed61f79a92c44a43.tar.gz tcl-25caae00155b668549f912b4ed61f79a92c44a43.tar.bz2 |
merge 8.5
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclFileName.c | 29 |
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); } /* |