diff options
author | patthoyts <patthoyts@users.sourceforge.net> | 2007-02-20 15:36:41 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@users.sourceforge.net> | 2007-02-20 15:36:41 (GMT) |
commit | a9ae76396604ebf325b996ace4452852d4f2bc35 (patch) | |
tree | cac9764bb901f3425c555fce169cd28b4fbaeb2e /generic/tclPathObj.c | |
parent | b0f20f7621b7a266aa45d3f289e913e510986ce1 (diff) | |
download | tcl-a9ae76396604ebf325b996ace4452852d4f2bc35.zip tcl-a9ae76396604ebf325b996ace4452852d4f2bc35.tar.gz tcl-a9ae76396604ebf325b996ace4452852d4f2bc35.tar.bz2 |
Bug #1479814. Handle extended paths on Windows NT and above.
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index c73eee8..1aa5cb2 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPathObj.c,v 1.56 2006/08/29 00:36:57 coldstore Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.57 2007/02/20 15:36:46 patthoyts Exp $ */ #include "tclInt.h" @@ -166,6 +166,21 @@ TclFSNormalizeAbsolutePath( dirSep = TclGetString(pathPtr); if (tclPlatform == TCL_PLATFORM_WINDOWS) { + if ( (dirSep[0] == '/' || dirSep[0] == '\\') + && (dirSep[1] == '/' || dirSep[1] == '\\') + && (dirSep[2] == '?') + && (dirSep[3] == '/' || dirSep[3] == '\\')) { + /* NT extended path */ + dirSep += 4; + + if ( (dirSep[0] == 'U' || dirSep[0] == 'u') + && (dirSep[1] == 'N' || dirSep[1] == 'n') + && (dirSep[2] == 'C' || dirSep[2] == 'c') + && (dirSep[3] == '/' || dirSep[3] == '\\')) { + /* NT extended UNC path */ + dirSep += 4; + } + } if (dirSep[0] != 0 && dirSep[1] == ':' && (dirSep[2] == '/' || dirSep[2] == '\\')) { /* Do nothing */ |