From d9cda2870181cf25a4234d1d8d99a0c8cc457927 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 13 Mar 2003 08:44:38 -0500 Subject: [PATCH] BUG: FindLibrary should not accept a directory even if the exact specified name exists. --- Source/cmSystemTools.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 39af7547a..0b32313ef 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1626,11 +1626,12 @@ std::string cmSystemTools::FindLibrary(const char* name, const std::vector& 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 path = userPaths; cmSystemTools::GetPath(path);