From 0356b81525019e054be5b6edc0c0f7ca51249f54 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Oct 2020 11:08:49 -0400 Subject: 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 --- Source/cmFindPackageCommand.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v0.12