// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma implementation "iniconf.h"
#endif
#include "wx/dynarray.h"
#include "wx/log.h"
#include "wx/config.h"
+#include "wx/file.h"
#include "wx/msw/iniconf.h"
bool wxIniConfig::DeleteEntry(const wxString& szKey, bool bGroupIfEmptyAlso)
{
// passing NULL as value to WritePrivateProfileString deletes the key
-// if ( !Write(szKey, (const char *)NULL) )
-// return FALSE;
wxConfigPathChanger path(this, szKey);
wxString strKey = GetPrivateKeyName(path.Name());
- if (WritePrivateProfileString(m_strGroup, szKey,
+ if (WritePrivateProfileString(m_strGroup, strKey,
(const char*) NULL, m_strLocalFilename) == 0)
return FALSE;
wxString strFile = szBuf;
strFile << '\\' << m_strLocalFilename;
- if ( !wxRemoveFile(strFile) ) {
+ if ( wxFile::Exists(strFile) && !wxRemoveFile(strFile) ) {
wxLogSysError(_("Can't delete the INI file '%s'"), strFile.c_str());
return FALSE;
}