summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-04-26 15:51:17 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-04-26 15:51:17 (GMT)
commit5da08b4c921f9c3f0e6c5c7049595fa6dc33f3b4 (patch)
tree97463c7bbdd389c18738b045f8a971a534b18cda
parent61852c42e80484c6c7460fdcc4497a108510088e (diff)
downloadtcl-5da08b4c921f9c3f0e6c5c7049595fa6dc33f3b4.zip
tcl-5da08b4c921f9c3f0e6c5c7049595fa6dc33f3b4.tar.gz
tcl-5da08b4c921f9c3f0e6c5c7049595fa6dc33f3b4.tar.bz2
* unix/tclUnixFCmd.c (TclpObjNormalizePath): Corrected improper
positioning of returned checkpoint. [Bug 941108]
-rw-r--r--ChangeLog5
-rw-r--r--unix/tclUnixFCmd.c15
2 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e7a98a0..0c69841 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-26 Don Porter <dgp@users.sourceforge.net>
+
+ * unix/tclUnixFCmd.c (TclpObjNormalizePath): Corrected improper
+ positioning of returned checkpoint. [Bug 941108]
+
2004-04-26 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* doc/open.n, doc/close.n: Updated (thanks to David Welton) to be
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 3bc94ca..430c932 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.36 2004/04/06 22:25:56 dgp Exp $
+ * RCS: @(#) $Id: tclUnixFCmd.c,v 1.37 2004/04/26 15:51:20 dgp Exp $
*
* Portions of this code were derived from NetBSD source code which has
* the following copyright notice:
@@ -1810,9 +1810,18 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint)
&& (strcmp(normPath, nativePath) == 0)) {
/* String is unchanged */
Tcl_DStringFree(&ds);
- if (path[nextCheckpoint] != '\0') {
- nextCheckpoint++;
+ /*
+ * Enable this to have the native FS claim normalization of
+ * the whole path for existing files. That would permit the
+ * caller to declare normalization complete without calls to
+ * additional filesystems. Saving lots of calls is probably
+ * worth the extra access() time here. When no other FS's
+ * are registered though, things are less clear.
+ *
+ if (0 == access(normPath, F_OK)) {
+ return pathLen;
}
+ */
return nextCheckpoint;
}