summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-03-13 13:44:38 (GMT)
committerBrad King <brad.king@kitware.com>2003-03-13 13:44:38 (GMT)
commitd9cda2870181cf25a4234d1d8d99a0c8cc457927 (patch)
tree6b539e46589a899fd04d23b8b9c28507926ea849 /Source/cmSystemTools.cxx
parent229355764bf95245757a7b469a92df31a8f3ca76 (diff)
downloadCMake-d9cda2870181cf25a4234d1d8d99a0c8cc457927.zip
CMake-d9cda2870181cf25a4234d1d8d99a0c8cc457927.tar.gz
CMake-d9cda2870181cf25a4234d1d8d99a0c8cc457927.tar.bz2
BUG: FindLibrary should not accept a directory even if the exact specified name exists.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 39af754..0b32313 100644
--- a/Source/cmSystemTools.cxx
+++ b/Source/cmSystemTools.cxx
@@ -1626,11 +1626,12 @@ std::string cmSystemTools::FindLibrary(const char* name,
const std::vector<std::string>& userPaths)
{
// See if the executable exists as written.
- if(cmSystemTools::FileExists(name))
+ if(cmSystemTools::FileExists(name) &&
+ !cmSystemTools::FileIsDirectory(name))
{
return cmSystemTools::CollapseFullPath(name);
}
-
+
// Add the system search path to our path.
std::vector<std::string> path = userPaths;
cmSystemTools::GetPath(path);