don't overwrite the existing local file if we failed to open it but it does exist

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-08-26 20:40:33 +00:00
parent 69562a1d4c
commit bf6d45ebf6

View File

@ -372,7 +372,16 @@ void wxFileConfig::Init()
}
else
{
wxLogWarning(_("can't open user configuration file '%s'."), m_fnLocalFile.GetFullPath().c_str() );
const wxString path = m_fnLocalFile.GetFullPath();
wxLogWarning(_("can't open user configuration file '%s'."),
path.c_str());
if ( m_fnLocalFile.FileExists() )
{
wxLogWarning(_("Changes won't be saved to avoid overwriting the existing file \"%s\""),
path.c_str());
m_fnLocalFile.Clear();
}
}
}