Fix for 163423. Make sure we let deletes of non-existing keys go thru at
runtime, they should no-op, not bring an install script to its knees. r=hewitt, sr=dveditz git-svn-id: svn://10.0.0.236/trunk@127603 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
bb292a2570
commit
048c44e151
@ -445,7 +445,12 @@ PRInt32
|
||||
nsWinReg::FinalDeleteKey(PRInt32 root, const nsString& subkey, PRInt32* aReturn)
|
||||
{
|
||||
SetRootKey(root);
|
||||
*aReturn = NativeDeleteKey(subkey);
|
||||
if ( PR_TRUE == NativeKeyExists(subkey) )
|
||||
*aReturn = NativeDeleteKey(subkey);
|
||||
else {
|
||||
NS_WARNING("Trying to delete a key that doesn't exist anymore. Possible causes include calling deleteKey for the same key multiple times, or key+subkey are not unique");
|
||||
*aReturn = ERROR_SUCCESS;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user