]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/regconf.cpp
don't Printf() the string into itself (replaces patch 1655318)
[wxWidgets.git] / src / msw / regconf.cpp
index 4c9d9e5fb7c0ecb9454fd4ac3d0fac98760d5672..71b62aeb95e74cbd218b619f4921d01422e9ceef 100644 (file)
@@ -697,9 +697,20 @@ bool wxRegConfig::DeleteEntry(const wxString& value, bool bGroupIfEmptyAlso)
 
 bool wxRegConfig::DeleteGroup(const wxString& key)
 {
-  wxConfigPathChanger path(this, key);
+  wxConfigPathChanger path(this, RemoveTrailingSeparator(key));
+
+  if ( !m_keyLocal.Exists() )
+  {
+      // nothing to do
+      return true;
+  }
 
-  return m_keyLocal.Exists() ? LocalKey().DeleteKey(path.Name()) : true;
+  if ( !LocalKey().DeleteKey(path.Name()) )
+      return false;
+
+  path.UpdateIfDeleted();
+
+  return true;
 }
 
 bool wxRegConfig::DeleteAll()
@@ -717,5 +728,4 @@ bool wxRegConfig::DeleteAll()
   return bOk;
 }
 
-#endif
-  // wxUSE_CONFIG
+#endif // wxUSE_CONFIG