diff options
author | vincentdarley <vincentdarley> | 2004-03-26 19:04:48 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2004-03-26 19:04:48 (GMT) |
commit | 1fab20da2dcd874015e0001999807698fcc6688e (patch) | |
tree | 40d72e632855c9e8ba31f676d6da0352a078b367 /generic | |
parent | dbf0dda330688becb98f2c5eb2e87878f80487cf (diff) | |
download | tcl-1fab20da2dcd874015e0001999807698fcc6688e.zip tcl-1fab20da2dcd874015e0001999807698fcc6688e.tar.gz tcl-1fab20da2dcd874015e0001999807698fcc6688e.tar.bz2 |
fixed another volume-relative file normalization problem
Diffstat (limited to 'generic')
-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 { |