diff options
author | vincentdarley <vincentdarley> | 2004-01-23 10:59:57 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2004-01-23 10:59:57 (GMT) |
commit | 532cf499694027af6614c6a70eeb557bb6d29a6a (patch) | |
tree | a0c28b5eaba664ae2cf954de2a8c8c836e74c31a /generic/tclPathObj.c | |
parent | ba9706852dcaec5a693270fd54a02746625b0a27 (diff) | |
download | tcl-532cf499694027af6614c6a70eeb557bb6d29a6a.zip tcl-532cf499694027af6614c6a70eeb557bb6d29a6a.tar.gz tcl-532cf499694027af6614c6a70eeb557bb6d29a6a.tar.bz2 |
file normalize bug fixes for .. and .
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index acb16b7..42dfaa3 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.20 2004/01/21 19:59:33 vincentdarley Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.21 2004/01/23 11:04:11 vincentdarley Exp $ */ #include "tclInt.h" @@ -216,6 +216,7 @@ TclFSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr) if (dirSep[1] == '.') { if (retVal != NULL) { Tcl_AppendToObj(retVal, oldDirSep, dirSep - oldDirSep); + oldDirSep = dirSep; } again: if (IsSeparatorOrNull(dirSep[2])) { @@ -226,6 +227,7 @@ TclFSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr) Tcl_IncrRefCount(retVal); } dirSep += 2; + oldDirSep = dirSep; if (dirSep[0] != 0 && dirSep[1] == '.') { goto again; } @@ -269,6 +271,7 @@ TclFSNormalizeAbsolutePath(interp, pathPtr, clientDataPtr) } } dirSep += 3; + oldDirSep = dirSep; if (dirSep[0] != 0 && dirSep[1] == '.') { goto again; } |