summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-09-18 11:29:26 (GMT)
committervincentdarley <vincentdarley>2003-09-18 11:29:26 (GMT)
commitbe5eee52adacf1bd8b62748f672f5026b9ce127b (patch)
treeb63a4b720140c83d88050bc257f8a91bd8725fb2
parentb955a84cbccac90a2e86c31ece45610838e409f3 (diff)
downloadtcl-be5eee52adacf1bd8b62748f672f5026b9ce127b.zip
tcl-be5eee52adacf1bd8b62748f672f5026b9ce127b.tar.gz
tcl-be5eee52adacf1bd8b62748f672f5026b9ce127b.tar.bz2
fileName test suite bug fix
-rw-r--r--ChangeLog6
-rw-r--r--generic/tclPathObj.c13
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index d7b1ca5..c864a72 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-09-17 Vince Darley <vincentdarley@users.sourceforge.net>
+
+ * tclPathObj.c: fix to test-suite problem introduced by the bug
+ fix below. No problem in ordinary code, just test suite code
+ which manually adjusts tclPlatform. [Bug 808247]
+
2003-09-16 Vince Darley <vincentdarley@users.sourceforge.net>
* doc/filename.n: documentation of Windows-specific feature as
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index e7718b1..3477b60 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.7 2003/09/16 14:56:08 vincentdarley Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.8 2003/09/18 11:29:27 vincentdarley Exp $
*/
#include "tclInt.h"
@@ -1177,7 +1177,6 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr)
*/
Tcl_Obj *absolutePath = fsPathPtr->translatedPathPtr;
char *path = Tcl_GetString(absolutePath);
- int type;
/*
* We have to be a little bit careful here to avoid infinite loops
@@ -1186,7 +1185,7 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr)
* action, which might loop back through here.
*/
if (path[0] != '\0') {
- type = Tcl_FSGetPathType(pathObjPtr);
+ Tcl_PathType type = Tcl_FSGetPathType(pathObjPtr);
if (type == TCL_PATH_RELATIVE) {
useThisCwd = Tcl_FSGetCwd(interp);
@@ -1195,6 +1194,7 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr)
absolutePath = Tcl_FSJoinToPath(useThisCwd, 1, &absolutePath);
Tcl_IncrRefCount(absolutePath);
/* We have a refCount on the cwd */
+#ifdef __WIN32__
} else if (type == TCL_PATH_VOLUME_RELATIVE) {
/*
* Only Windows has volume-relative paths. These
@@ -1203,6 +1203,12 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr)
* handle them here, rather than in the native fs code,
* because we really need to have a real absolute path
* just below.
+ *
+ * We do not let this block compile on non-Windows
+ * platforms because the test suite's manual forcing
+ * of tclPlatform can otherwise cause this code path
+ * to be executed, causing various errors because
+ * volume-relative paths really do not exist.
*/
useThisCwd = Tcl_FSGetCwd(interp);
if (useThisCwd == NULL) return NULL;
@@ -1239,6 +1245,7 @@ Tcl_FSGetNormalizedPath(interp, pathObjPtr)
useThisCwd = NULL;
}
}
+#endif /* __WIN32__ */
}
}
/* Already has refCount incremented */