X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3b466481eac25cbef1d35aaf6ee9d94167a07b9..015ee8444a80efa1d52815a6b3b93ea2d85d5e92:/src/msw/regconf.cpp diff --git a/src/msw/regconf.cpp b/src/msw/regconf.cpp index 5fec4bd4be..99382c2ce2 100644 --- a/src/msw/regconf.cpp +++ b/src/msw/regconf.cpp @@ -24,9 +24,13 @@ #include #endif //WX_PRECOMP +#include #include #include #include + +#ifndef __WIN16__ + #include #include @@ -444,7 +448,7 @@ bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso) return FALSE; if ( !m_keyLocal.HasSubkeys() ) { - wxString strKey = GetPath().Right(wxCONFIG_PATH_SEPARATOR); + wxString strKey = GetPath().AfterLast(wxCONFIG_PATH_SEPARATOR); SetPath(".."); // changes m_keyLocal return m_keyLocal.DeleteKey(strKey); } @@ -463,10 +467,18 @@ bool wxRegConfig::DeleteAll() { m_keyLocal.Close(); m_keyGlobal.Close(); - +#if 1 + wxFAIL_MSG("wxRegConfig::DeleteAll will wipe out your entire registry, so please do not use until it's fixed!"); + return FALSE; +#else bool bOk = m_keyLocalRoot.DeleteSelf(); if ( bOk ) bOk = m_keyGlobalRoot.DeleteSelf(); return bOk; +#endif } + +#endif + // __WIN16__ +