diff options
author | vincentdarley <vincentdarley> | 2001-09-28 11:10:56 (GMT) |
---|---|---|
committer | vincentdarley <vincentdarley> | 2001-09-28 11:10:56 (GMT) |
commit | cae247df825bf42c0dd22f43f2047a307d54eb65 (patch) | |
tree | ac71695978289a7c8aab3987c2ba9f64896f49d5 | |
parent | b32ac06e6c6eecabdceefee25539d048dcfb00fe (diff) | |
download | tcl-cae247df825bf42c0dd22f43f2047a307d54eb65.zip tcl-cae247df825bf42c0dd22f43f2047a307d54eb65.tar.gz tcl-cae247df825bf42c0dd22f43f2047a307d54eb65.tar.bz2 |
normalize fix
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | unix/tclUnixFCmd.c | 4 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 4 |
3 files changed, 14 insertions, 4 deletions
@@ -1,3 +1,13 @@ +2001-09-28 Vince Darley <vincentdarley@users.sourceforge.net> + + * win/tclWinFCmd.c: + * unix/tclUnixFCmd.c: fix to performance issue reported + by jcw in which 'access("")' is called unnecessarily when + normalizing any absolute path. + * generic/tclIO.c: added '(ClientData)' cast to calls to + Tcl_(Preserve|Release) newly introduced, fixing compile + error on Windows. + 2001-09-27 Don Porter <dgp@users.sourceforge.net> * doc/FileSystem.3 (Tcl_FSLoadFile): diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 98d5224..f2fd914 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.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: tclUnixFCmd.c,v 1.12 2001/09/04 18:06:34 vincentdarley Exp $ + * RCS: @(#) $Id: tclUnixFCmd.c,v 1.13 2001/09/28 11:10:56 vincentdarley Exp $ * * Portions of this code were derived from NetBSD source code which has * the following copyright notice: @@ -1644,7 +1644,7 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) while (1) { char cur = *currentPathEndPosition; - if (cur == '/' || cur == 0) { + if ((cur == '/' || cur == 0) && (path != currentPathEndPosition)) { /* Reached directory separator, or end of string */ Tcl_DString ds; char *nativePath; diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 5981ac2..0611ca8 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.13 2001/09/28 01:21:53 dgp Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.14 2001/09/28 11:10:56 vincentdarley Exp $ */ #include "tclWinInt.h" @@ -1731,7 +1731,7 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint) while (1) { char cur = *currentPathEndPosition; - if (cur == '/' || cur == 0) { + if ((cur == '/' || cur == 0) && (path != currentPathEndPosition)) { /* Reached directory separator, or end of string */ Tcl_DString ds; DWORD attr; |