summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2005-08-08 23:20:08 (GMT)
committervincentdarley <vincentdarley>2005-08-08 23:20:08 (GMT)
commit1867a443a7465499ed1ac544e3d9d8a2b547843b (patch)
tree921bcbc13c1de260e6b9e5505fd99c27b07dd761 /generic/tclPathObj.c
parent7cd7d43d4c30ccf407db8a9d565624b86bd9cfe0 (diff)
downloadtcl-1867a443a7465499ed1ac544e3d9d8a2b547843b.zip
tcl-1867a443a7465499ed1ac544e3d9d8a2b547843b.tar.gz
tcl-1867a443a7465499ed1ac544e3d9d8a2b547843b.tar.bz2
file rootname bug fix
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index 362d489..96190d0 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.42 2005/07/21 14:38:50 dkf Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.43 2005/08/08 23:20:11 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -572,7 +572,6 @@ TclPathPart(interp, pathPtr, portion)
case TCL_PATH_EXTENSION:
return GetExtension(fsPathPtr->normPathPtr);
case TCL_PATH_ROOT: {
- /* Unimplemented */
CONST char *fileName, *extension;
int length;
@@ -607,6 +606,10 @@ TclPathPart(interp, pathPtr, portion)
Tcl_SetObjLength(fsDupPtr->normPathPtr,
(int)(length - strlen(extension)));
}
+ if (root->bytes != NULL && root->length > 0) {
+ /* Have string rep as well */
+ root->length -= strlen(extension);
+ }
return root;
}
}