diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclPathObj.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index be3ac61..40570aa 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.13 2003/11/03 12:49:11 vincentdarley Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.14 2003/11/24 10:13:36 vincentdarley Exp $ */ #include "tclInt.h" @@ -1266,15 +1266,22 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr) } if (drive[0] == drive_c) { absolutePath = Tcl_DuplicateObj(useThisCwd); - Tcl_IncrRefCount(absolutePath); - Tcl_AppendToObj(absolutePath, "/", 1); - Tcl_AppendToObj(absolutePath, path+2, -1); /* We have a refCount on the cwd */ } else { - /* We just can't handle it correctly here */ Tcl_DecrRefCount(useThisCwd); useThisCwd = NULL; + /* + * The path is not in the current drive, but + * is volume-relative. The way Tcl 8.3 handles + * this is that it treats such a path as + * relative to the root of the drive. We + * therefore behave the same here. + */ + absolutePath = Tcl_NewStringObj(path, 2); } + Tcl_IncrRefCount(absolutePath); + Tcl_AppendToObj(absolutePath, "/", 1); + Tcl_AppendToObj(absolutePath, path+2, -1); } #endif /* __WIN32__ */ } |