summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2005-08-09 11:02:36 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2005-08-09 11:02:36 (GMT)
commite3a44d5bcdf9978525f969aa383aeede5ccbab34 (patch)
tree05204ffdc40ee019d19bd486b7b6dc4cf9ffe110 /generic/tclPathObj.c
parent13c5af6b35e9dfd5ff51e9a7eb1fa7cc8ee95909 (diff)
downloadtcl-e3a44d5bcdf9978525f969aa383aeede5ccbab34.zip
tcl-e3a44d5bcdf9978525f969aa383aeede5ccbab34.tar.gz
tcl-e3a44d5bcdf9978525f969aa383aeede5ccbab34.tar.bz2
More informative comment.
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index bd94477..f46854e 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.44 2005/08/09 04:17:38 dgp Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.45 2005/08/09 11:02:36 dkf Exp $
*/
#include "tclInt.h"
@@ -606,8 +606,12 @@ TclPathPart(interp, pathPtr, portion)
Tcl_SetObjLength(fsDupPtr->normPathPtr,
(int)(length - strlen(extension)));
}
+
+ /*
+ * Must also trim the string representation if we have it.
+ */
+
if (root->bytes != NULL && root->length > 0) {
- /* Have string rep as well */
root->length -= strlen(extension);
root->bytes[root->length] = 0;
}