X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/80fdb8d64f1ddecdef2d987d79871b5b508930c0..72a0a2de1eaac771fa02c606c541ef87f625d11e:/src/common/fileconf.cpp diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 9899d67a9d..6423bbe8e9 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -1090,8 +1090,11 @@ bool wxFileConfig::DeleteAll() { 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();