diff options
author | patthoyts <patthoyts@noemail.net> | 2007-02-20 15:36:41 (GMT) |
---|---|---|
committer | patthoyts <patthoyts@noemail.net> | 2007-02-20 15:36:41 (GMT) |
commit | 475092f08b1be04ff4122ad25665d6a60a7dced9 (patch) | |
tree | cac9764bb901f3425c555fce169cd28b4fbaeb2e /generic/tclPathObj.c | |
parent | 6cf58c22d35d17559880155120cf15e2f7075417 (diff) | |
download | tcl-475092f08b1be04ff4122ad25665d6a60a7dced9.zip tcl-475092f08b1be04ff4122ad25665d6a60a7dced9.tar.gz tcl-475092f08b1be04ff4122ad25665d6a60a7dced9.tar.bz2 |
Bug #1479814. Handle extended paths on Windows NT and above.
FossilOrigin-Name: 05001e9ac26df0543c40dddde186d08225a14adf
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 */ |