git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24191
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
- added gettext plural forms support to wxLocale (Michael N. Filippov)
- wxFileName::Normalize(wxPATH_NORM_ALL) doesn't lower filename case any more
- wxFileName::Normalize(wxPATH_NORM_ENV_VARS) now works
+- check if file exists in wxFileConfig::DeleteFile() (Christian Sturmlechner)
All (GUI):
{
CleanUp();
- if ( wxRemove(m_strLocalFile) == -1 )
- wxLogSysError(_("can't delete user configuration file '%s'"), m_strLocalFile.c_str());
+ if ( wxFile::Exists(m_strLocalFile) && wxRemove(m_strLocalFile) == -1 )
+ {
+ wxLogSysError(_("can't delete user configuration file '%s'"), m_strLocalFile.c_str());
+ return FALSE;
+ }
m_strLocalFile = m_strGlobalFile = wxT("");
Init();
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;
}