don't complain if file doesn't exist in DeleteFile(); do return false if it exists and we failed to delete it (patch 819530)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user