diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2005-08-09 11:02:36 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2005-08-09 11:02:36 (GMT) |
| commit | 4347806bf8ae1668b89ec9aa2e1572ba91e14b3f (patch) | |
| tree | 05204ffdc40ee019d19bd486b7b6dc4cf9ffe110 | |
| parent | b003b58db47e0f3554b97582ce5386e1c2c71550 (diff) | |
| download | tcl-4347806bf8ae1668b89ec9aa2e1572ba91e14b3f.zip tcl-4347806bf8ae1668b89ec9aa2e1572ba91e14b3f.tar.gz tcl-4347806bf8ae1668b89ec9aa2e1572ba91e14b3f.tar.bz2 | |
More informative comment.
| -rw-r--r-- | generic/tclPathObj.c | 8 |
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; } |
