summaryrefslogtreecommitdiffstats
path: root/generic
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)
commitb71d42eeb6ceee9c5e1522add446fa8fcf290133 (patch)
tree8dbefadcd026e21c101edf3c5f493461db64ce87 /generic
parent6cc9c9135237ce0e575c11723aca5883527e5c97 (diff)
downloadtcl-b71d42eeb6ceee9c5e1522add446fa8fcf290133.zip
tcl-b71d42eeb6ceee9c5e1522add446fa8fcf290133.tar.gz
tcl-b71d42eeb6ceee9c5e1522add446fa8fcf290133.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')
-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);