blind fix for temp file creation problem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13106 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,6 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/textfile.h"
|
#include "wx/textfile.h"
|
||||||
|
#include "wx/filename.h"
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// wxTextFile class implementation
|
// wxTextFile class implementation
|
||||||
@@ -172,7 +173,11 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
|||||||
|
|
||||||
bool wxTextFile::OnWrite(wxTextFileType typeNew, wxMBConv& conv)
|
bool wxTextFile::OnWrite(wxTextFileType typeNew, wxMBConv& conv)
|
||||||
{
|
{
|
||||||
wxTempFile fileTmp(m_strBufferName);
|
wxFileName fn = m_strBufferName;
|
||||||
|
if ( !fn.IsAbsolute() )
|
||||||
|
fn.Normalize();
|
||||||
|
|
||||||
|
wxTempFile fileTmp(fn.GetFullName());
|
||||||
|
|
||||||
if ( !fileTmp.IsOpened() ) {
|
if ( !fileTmp.IsOpened() ) {
|
||||||
wxLogError(_("can't write buffer '%s' to disk."), m_strBufferName.c_str());
|
wxLogError(_("can't write buffer '%s' to disk."), m_strBufferName.c_str());
|
||||||
|
Reference in New Issue
Block a user