diff options
author | vincentdarley <vincentdarley@noemail.net> | 2004-03-26 19:04:47 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley@noemail.net> | 2004-03-26 19:04:47 (GMT) |
commit | ef68166a260f4ed4234bf0eeb5d27ebc23304643 (patch) | |
tree | 40d72e632855c9e8ba31f676d6da0352a078b367 /generic/tclPathObj.c | |
parent | d9659c2ef07f0dc0847c002a465702910e2284b4 (diff) | |
download | tcl-ef68166a260f4ed4234bf0eeb5d27ebc23304643.zip tcl-ef68166a260f4ed4234bf0eeb5d27ebc23304643.tar.gz tcl-ef68166a260f4ed4234bf0eeb5d27ebc23304643.tar.bz2 |
fixed another volume-relative file normalization problem
FossilOrigin-Name: 82c15c433d5eb26da6517c5d08b9bdb8074bd7ee
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 2be2a7e..6302660 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.26 2004/03/26 18:45:10 vincentdarley Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.27 2004/03/26 19:04:49 vincentdarley Exp $ */ #include "tclInt.h" @@ -1689,10 +1689,18 @@ Tcl_FSGetNormalizedPath(interp, pathPtr) } if (drive[0] == drive_cur) { absolutePath = Tcl_DuplicateObj(useThisCwd); - /* We have a refCount on the cwd */ + /* + * We have a refCount on the cwd, which we + * will release later. + */ - if (drive[cwdLen-1] != '/') { - /* Only add a trailing '/' if needed */ + if (drive[cwdLen-1] != '/' && (path[2] != '\0')) { + /* + * Only add a trailing '/' if needed, which + * is if there isn't one already, and if we + * are going to be adding some more + * characters. + */ Tcl_AppendToObj(absolutePath, "/", 1); } } else { |