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;
|
data[dataSize] = 0;
|
||||||
cmsys_ios::stringstream ss(&data[0]);
|
cmsys_ios::stringstream ss(&data[0]);
|
||||||
if(this->CheckPackageRegistryEntry(ss))
|
if(!this->CheckPackageRegistryEntry(ss))
|
||||||
{
|
{
|
||||||
// The entry is okay.
|
// The entry is invalid.
|
||||||
continue;
|
bad.insert(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bad.insert(name);
|
|
||||||
break;
|
break;
|
||||||
case ERROR_MORE_DATA:
|
case ERROR_MORE_DATA:
|
||||||
data.resize(dataSize+1);
|
data.resize(dataSize+1);
|
||||||
|
|
Loading…
Reference in New Issue