summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-01-23 10:59:57 (GMT)
committervincentdarley <vincentdarley>2004-01-23 10:59:57 (GMT)
commit532cf499694027af6614c6a70eeb557bb6d29a6a (patch)
treea0c28b5eaba664ae2cf954de2a8c8c836e74c31a /win
parentba9706852dcaec5a693270fd54a02746625b0a27 (diff)
downloadtcl-532cf499694027af6614c6a70eeb557bb6d29a6a.zip
tcl-532cf499694027af6614c6a70eeb557bb6d29a6a.tar.gz
tcl-532cf499694027af6614c6a70eeb557bb6d29a6a.tar.bz2
file normalize bug fixes for .. and .
Diffstat (limited to 'win')
-rw-r--r--win/tclWinFile.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index 12fad95..6a4ddff 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.59 2004/01/21 19:59:34 vincentdarley Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.60 2004/01/23 11:06:00 vincentdarley Exp $
*/
//#define _WIN32_WINNT 0x0500
@@ -2433,9 +2433,18 @@ TclpObjNormalizePath(interp, pathPtr, nextCheckpoint)
&& (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {
Tcl_Obj *to = WinReadLinkDirectory(nativePath);
if (to != NULL) {
- /* Read the reparse point ok */
- /* Tcl_GetStringFromObj(to, &pathLen); */
- nextCheckpoint = 0; /* pathLen */
+ /*
+ * Read the reparse point ok. Now, reparse
+ * points need not be normalized, otherwise
+ * we could use:
+ *
+ * Tcl_GetStringFromObj(to, &pathLen);
+ * nextCheckpoint = pathLen
+ *
+ * So, instead we have to start from the
+ * beginning.
+ */
+ nextCheckpoint = 0;
Tcl_AppendToObj(to, currentPathEndPosition, -1);
/* Convert link to forward slashes */
for (path = Tcl_GetString(to); *path != 0; path++) {