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
This commit is contained in:
syd%netscape.com 2002-08-19 09:57:55 +00:00
Родитель 07e2d4c47a
Коммит 12df51c14f
1 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -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;
}