X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ff1b5f81af5dce8dac0c134f0e01adffc5334347..1a42f89c41256c9de765b5e7671f4d1e94dbdc51:/src/msw/iniconf.cpp?ds=sidebyside diff --git a/src/msw/iniconf.cpp b/src/msw/iniconf.cpp index 370256f3c0..0184d5ab1f 100644 --- a/src/msw/iniconf.cpp +++ b/src/msw/iniconf.cpp @@ -35,6 +35,7 @@ #include "wx/dynarray.h" #include "wx/log.h" #include "wx/config.h" +#include "wx/file.h" #include "wx/msw/iniconf.h" @@ -439,7 +440,7 @@ bool wxIniConfig::DeleteAll() 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; }