diff options
author | Brad King <brad.king@kitware.com> | 2020-10-19 15:08:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-10-19 15:08:49 (GMT) |
commit | 0356b81525019e054be5b6edc0c0f7ca51249f54 (patch) | |
tree | f1601e00b556daae032b90b703a1be6b9d4fa87b /Source/cmFindPackageCommand.cxx | |
parent | e61d872839a84a5ab7a5e8489008ffed9b83782e (diff) | |
download | CMake-0356b81525019e054be5b6edc0c0f7ca51249f54.zip CMake-0356b81525019e054be5b6edc0c0f7ca51249f54.tar.gz CMake-0356b81525019e054be5b6edc0c0f7ca51249f54.tar.bz2 |
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
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index c988b59..92b1e80 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -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) { |