+ bool ret = file.Commit();
+
+#if defined(__WXMAC__) && !defined(__UNIX__)
+ if ( ret )
+ {
+ FSSpec spec ;
+
+ wxUnixFilename2FSSpec( m_strLocalFile , &spec ) ;
+ FInfo finfo ;
+ if ( FSpGetFInfo( &spec , &finfo ) == noErr )
+ {
+ finfo.fdType = 'TEXT' ;
+ finfo.fdCreator = 'ttxt' ;
+ FSpSetFInfo( &spec , &finfo ) ;
+ }
+ }
+#endif // __WXMAC__ && !__UNIX__
+
+#ifdef __UNIX__
+ // restore the old umask if we changed it
+ if ( m_umask != -1 )
+ {
+ (void)umask(umaskOld);
+ }
+#endif // __UNIX__
+
+ return ret;
+}
+
+// ----------------------------------------------------------------------------
+// renaming groups/entries
+// ----------------------------------------------------------------------------
+
+bool wxFileConfig::RenameEntry(const wxString& oldName,
+ const wxString& newName)
+{
+ // check that the entry exists
+ ConfigEntry *oldEntry = m_pCurrentGroup->FindEntry(oldName);
+ if ( !oldEntry )
+ return FALSE;
+
+ // check that the new entry doesn't already exist
+ if ( m_pCurrentGroup->FindEntry(newName) )
+ return FALSE;
+
+ // delete the old entry, create the new one
+ wxString value = oldEntry->Value();
+ if ( !m_pCurrentGroup->DeleteEntry(oldName) )
+ return FALSE;
+
+ ConfigEntry *newEntry = m_pCurrentGroup->AddEntry(newName);
+ newEntry->SetValue(value);
+
+ return TRUE;
+}
+
+bool wxFileConfig::RenameGroup(const wxString& oldName,
+ const wxString& newName)
+{
+ // check that the group exists
+ ConfigGroup *group = m_pCurrentGroup->FindSubgroup(oldName);
+ if ( !group )
+ return FALSE;
+
+ // check that the new group doesn't already exist
+ if ( m_pCurrentGroup->FindSubgroup(newName) )
+ return FALSE;
+
+ group->Rename(newName);
+
+ return TRUE;