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:
parent
a3722eeb81
commit
68c97af3c3
@ -31,13 +31,14 @@
|
||||
#if wxUSE_TEXTFILE
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/string.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/file.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/file.h"
|
||||
#include "wx/log.h"
|
||||
#endif
|
||||
|
||||
#include "wx/textfile.h"
|
||||
#include "wx/filename.h"
|
||||
|
||||
// ============================================================================
|
||||
// wxTextFile class implementation
|
||||
@ -172,7 +173,11 @@ bool wxTextFile::OnRead(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() ) {
|
||||
wxLogError(_("can't write buffer '%s' to disk."), m_strBufferName.c_str());
|
||||
|
Loading…
Reference in New Issue
Block a user