summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-02-20 18:24:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-02-20 18:24:28 (GMT)
commit66e884275c19a6e17f016bf828eed7b61431888b (patch)
tree8dbefadcd026e21c101edf3c5f493461db64ce87 /generic/tclIOUtil.c
parent013eca4890e05fe73b703f0392142edce980ddda (diff)
downloadtcl-66e884275c19a6e17f016bf828eed7b61431888b.zip
tcl-66e884275c19a6e17f016bf828eed7b61431888b.tar.gz
tcl-66e884275c19a6e17f016bf828eed7b61431888b.tar.bz2
* generic/tclPathObj.c: Fixed mistaken logic in TclFSGetPathType()
* tests/fileName.test: that assumed (not "absolute" => "relative"). This is a false assumption on Windows, where "volumerelative" is another possibility. [Bug 2571597].
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r--generic/tclIOUtil.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c
index 82aa209..4d741b4 100644
--- a/generic/tclIOUtil.c
+++ b/generic/tclIOUtil.c
@@ -17,7 +17,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIOUtil.c,v 1.77.2.39 2008/12/04 17:43:53 dgp Exp $
+ * RCS: @(#) $Id: tclIOUtil.c,v 1.77.2.40 2009/02/20 18:24:28 dgp Exp $
*/
#include "tclInt.h"
@@ -4747,7 +4747,16 @@ FSGetPathType(pathObjPtr, filesystemPtrPtr, driveNameLengthPtr)
FsPath *fsPathPtr = (FsPath*) PATHOBJ(pathObjPtr);
if (fsPathPtr->cwdPtr != NULL) {
if (PATHFLAGS(pathObjPtr) == 0) {
+ /* The path is not absolute... */
+#ifdef __WIN32__
+ /* ... on Windows we must make another call to determine
+ * whether it's relative or volumerelative [Bug 2571597]. */
+ return GetPathType(pathObjPtr, filesystemPtrPtr,
+ driveNameLengthPtr, NULL);
+#else
+ /* On other systems, quickly deduce !absolute -> relative */
return TCL_PATH_RELATIVE;
+#endif
}
return FSGetPathType(fsPathPtr->cwdPtr, filesystemPtrPtr,
driveNameLengthPtr);