diff options
author | dgp <dgp@noemail.net> | 2009-02-20 18:19:15 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2009-02-20 18:19:15 (GMT) |
commit | 27b43de3da291f8fef417e861180cf9313eb2391 (patch) | |
tree | 7e83d0300e335428ad187891e7a59bd4aaa8a793 /generic/tclPathObj.c | |
parent | 7006f1e352cf3370a4eebe9a52ce920fb117f1c6 (diff) | |
download | tcl-27b43de3da291f8fef417e861180cf9313eb2391.zip tcl-27b43de3da291f8fef417e861180cf9313eb2391.tar.gz tcl-27b43de3da291f8fef417e861180cf9313eb2391.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: c8c2551b948dccaaf904fcd575733d0c71afa77f
Diffstat (limited to 'generic/tclPathObj.c')
-rw-r--r-- | generic/tclPathObj.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index 74f526a..725f2a9 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.78 2009/02/10 22:49:50 nijtmans Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.79 2009/02/20 18:19:16 dgp Exp $ */ #include "tclInt.h" @@ -511,7 +511,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); |