fixed false alert in wxRegKey::DeleteSelf

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8557 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-10-14 20:28:18 +00:00
parent f4dcad9933
commit 3cc487d140

View File

@@ -620,8 +620,9 @@ bool wxRegKey::DeleteSelf()
// prevent a buggy program from erasing one of the root registry keys or an // prevent a buggy program from erasing one of the root registry keys or an
// immediate subkey (i.e. one which doesn't have '\\' inside) of any other // immediate subkey (i.e. one which doesn't have '\\' inside) of any other
// key except HKCR (HKCR has some "deleteable" subkeys) // key except HKCR (HKCR has some "deleteable" subkeys)
if ( m_strKey.IsEmpty() || (m_hRootKey != HKCR && if ( m_strKey.IsEmpty() ||
m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND) ) { ((m_hRootKey != (WXHKEY) aStdKeys[HKCR].hkey) &&
(m_strKey.Find(REG_SEPARATOR) == wxNOT_FOUND)) ) {
wxLogError(_("Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted."), GetFullName(this)); wxLogError(_("Registry key '%s' is needed for normal system operation,\ndeleting it will leave your system in unusable state:\noperation aborted."), GetFullName(this));
return FALSE; return FALSE;