mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 23:59:53 -05:00
find_package: Fix regression in searching root prefix
Fix the check added by commit 2ff1693066 (find_package: avoid showing
files as directories when searching config files, 2020-09-30,
v3.19.0-rc1~67^2) to avoid skipping the root prefix `/`.
Fixes: #21324
This commit is contained in:
@@ -1984,7 +1984,7 @@ cmFileListGeneratorBase* cmFileListGeneratorBase::SetNext(
|
||||
bool cmFileListGeneratorBase::Consider(std::string const& fullPath,
|
||||
cmFileList& listing)
|
||||
{
|
||||
if (!cmSystemTools::FileIsDirectory(fullPath)) {
|
||||
if (!fullPath.empty() && !cmSystemTools::FileIsDirectory(fullPath)) {
|
||||
return false;
|
||||
}
|
||||
if (this->Next) {
|
||||
|
||||
Reference in New Issue
Block a user