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.
This commit is contained in:
parent
4df119773c
commit
c9563dbe1a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue