diff options
author | dgp <dgp@noemail.net> | 2009-02-20 18:24:28 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2009-02-20 18:24:28 (GMT) |
commit | 64b546330e8b0b927a6d6d337fdbc023a6d75fc1 (patch) | |
tree | 8dbefadcd026e21c101edf3c5f493461db64ce87 /generic/tclIOUtil.c | |
parent | e2f5ed91d722f56160f5e8fc75bfaa9358125a7f (diff) | |
download | tcl-64b546330e8b0b927a6d6d337fdbc023a6d75fc1.zip tcl-64b546330e8b0b927a6d6d337fdbc023a6d75fc1.tar.gz tcl-64b546330e8b0b927a6d6d337fdbc023a6d75fc1.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: f8a85ea635460f878e85147f8ee505c2f34eb20e
Diffstat (limited to 'generic/tclIOUtil.c')
-rw-r--r-- | generic/tclIOUtil.c | 11 |
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); |