wxRemove and wxRename takes const wxChar*, do NOT use fn_str()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7091 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -541,12 +541,12 @@ bool wxTempFile::Commit()
|
||||
m_file.Close();
|
||||
|
||||
#ifndef __WXMAC__
|
||||
if ( wxFile::Exists(m_strName) && wxRemove(m_strName.fn_str()) != 0 ) {
|
||||
if ( wxFile::Exists(m_strName) && wxRemove(m_strName) != 0 ) {
|
||||
wxLogSysError(_("can't remove file '%s'"), m_strName.c_str());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if ( wxRename(m_strTemp.fn_str(), m_strName.fn_str()) != 0 ) {
|
||||
if ( wxRename(m_strTemp, m_strName) != 0 ) {
|
||||
wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str());
|
||||
return FALSE;
|
||||
}
|
||||
@@ -569,7 +569,7 @@ void wxTempFile::Discard()
|
||||
{
|
||||
m_file.Close();
|
||||
#ifndef __WXMAC__
|
||||
if ( wxRemove(m_strTemp.fn_str()) != 0 )
|
||||
if ( wxRemove(m_strTemp) != 0 )
|
||||
wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str());
|
||||
#else
|
||||
if ( remove( wxUnix2MacFilename(m_strTemp.fn_str())) != 0 )
|
||||
|
Reference in New Issue
Block a user