summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-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;
}
}