mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Don't complain that non-existant registry entries cannot be deleted.
This commit is contained in:
parent
c849e63eb0
commit
55a9864cb4
1 changed files with 2 additions and 2 deletions
|
@ -2169,7 +2169,7 @@ void DeleteRegistryKey(char *string)
|
||||||
MessageBox(GetFocus(), string, "Could not open key", MB_OK);
|
MessageBox(GetFocus(), string, "Could not open key", MB_OK);
|
||||||
else {
|
else {
|
||||||
result = RegDeleteKey(hKey, subkeyname);
|
result = RegDeleteKey(hKey, subkeyname);
|
||||||
if (result != ERROR_SUCCESS)
|
if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND)
|
||||||
MessageBox(GetFocus(), string, "Could not delete key", MB_OK);
|
MessageBox(GetFocus(), string, "Could not delete key", MB_OK);
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
@ -2211,7 +2211,7 @@ void DeleteRegistryValue(char *string)
|
||||||
MessageBox(GetFocus(), string, "Could not open key", MB_OK);
|
MessageBox(GetFocus(), string, "Could not open key", MB_OK);
|
||||||
else {
|
else {
|
||||||
result = RegDeleteValue(hKey, valuename);
|
result = RegDeleteValue(hKey, valuename);
|
||||||
if (result != ERROR_SUCCESS)
|
if (result != ERROR_SUCCESS && result != ERROR_FILE_NOT_FOUND)
|
||||||
MessageBox(GetFocus(), string, "Could not delete value", MB_OK);
|
MessageBox(GetFocus(), string, "Could not delete value", MB_OK);
|
||||||
RegCloseKey(hKey);
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue