summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-04-13 15:00:06 (GMT)
committerBrad King <brad.king@kitware.com>2011-04-13 16:59:00 (GMT)
commitc9563dbe1aaee196b6e69926ae66234dd2d6fa22 (patch)
tree011a5a0a26223ae5a5768c34763819a45449025f /Source/cmFindPackageCommand.cxx
parent4df119773c18280c0bb16fc87312c8144fc1c3f8 (diff)
downloadCMake-c9563dbe1aaee196b6e69926ae66234dd2d6fa22.zip
CMake-c9563dbe1aaee196b6e69926ae66234dd2d6fa22.tar.gz
CMake-c9563dbe1aaee196b6e69926ae66234dd2d6fa22.tar.bz2
find_package: Cleanup user package registry less aggressively
Delete only REG_SZ entries that are specifically detected to point to invalid paths. This will allow future versions to add other value types for different purposes.
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index aaf95fb..d2d3956 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1308,13 +1308,12 @@ void cmFindPackageCommand::LoadPackageRegistryWin()
{
data[dataSize] = 0;
cmsys_ios::stringstream ss(&data[0]);
- if(this->CheckPackageRegistryEntry(ss))
+ if(!this->CheckPackageRegistryEntry(ss))
{
- // The entry is okay.
- continue;
+ // The entry is invalid.
+ bad.insert(name);
}
}
- bad.insert(name);
break;
case ERROR_MORE_DATA:
data.resize(dataSize+1);