don't give error msg when deleting non existing keys neither (part of patch 830049)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2003-10-28 10:55:05 +00:00
parent 5356f74c4c
commit 86a7257f11

View File

@ -683,7 +683,9 @@ bool wxRegKey::DeleteSelf()
Close();
m_dwLastError = RegDeleteKey((HKEY) m_hRootKey, m_strKey);
if ( m_dwLastError != ERROR_SUCCESS ) {
// deleting a key which doesn't exist is not considered an error
if ( m_dwLastError != ERROR_SUCCESS &&
m_dwLastError !- ERROR_FILE_NOT_FOUND ) {
wxLogSysError(m_dwLastError, _("Can't delete key '%s'"),
GetName().c_str());
return FALSE;