summaryrefslogtreecommitdiffstats
path: root/generic/tclPathObj.c
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2009-02-20 18:19:31 (GMT)
committerdgp <dgp@noemail.net>2009-02-20 18:19:31 (GMT)
commit13d8fc2ff3c32def7d605120f713f2e51d53b2a1 (patch)
treeb5437594e0ed24690db8d1c04e55748bbd51197f /generic/tclPathObj.c
parente28d96b80b209a03dff75dc649a58474d1efda49 (diff)
downloadtcl-13d8fc2ff3c32def7d605120f713f2e51d53b2a1.zip
tcl-13d8fc2ff3c32def7d605120f713f2e51d53b2a1.tar.gz
tcl-13d8fc2ff3c32def7d605120f713f2e51d53b2a1.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]. FossilOrigin-Name: 703b79a9764ccc001a36ccef890080bae3d14d71
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r--generic/tclPathObj.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c
index dee1745..28345da 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.66.2.5 2008/12/04 17:45:02 dgp Exp $
+ * RCS: @(#) $Id: tclPathObj.c,v 1.66.2.6 2009/02/20 18:19:32 dgp Exp $
*/
#include "tclInt.h"
@@ -510,7 +510,16 @@ TclFSGetPathType(
}
if (PATHFLAGS(pathPtr) == 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 TclGetPathType(pathPtr, filesystemPtrPtr, driveNameLengthPtr,
+ NULL);
+#else
+ /* On other systems, quickly deduce !absolute -> relative */
return TCL_PATH_RELATIVE;
+#endif
}
return TclFSGetPathType(fsPathPtr->cwdPtr, filesystemPtrPtr,
driveNameLengthPtr);