diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 31f1201..3242b6d 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -433,7 +433,8 @@ bool cmFindLibraryHelper::CheckDirectoryForName(std::string const& path, #endif if (name.Regex.find(testName)) { this->TestPath = cmStrCat(path, origName); - if (!cmSystemTools::FileIsDirectory(this->TestPath)) { + // Make sure the path is readable and is not a directory. + if (cmSystemTools::FileExists(this->TestPath, true)) { this->DebugLibraryFound(name.Raw, dir); // This is a matching file. Check if it is better than the |