set m_lasterror if the file couldn't be opened in wxFileInputStream ctor
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f8be01b1ac
commit
b9698194c1
@ -37,6 +37,8 @@ wxFileInputStream::wxFileInputStream(const wxString& fileName)
|
||||
{
|
||||
m_file = new wxFile(fileName, wxFile::read);
|
||||
m_file_destroy = true;
|
||||
if ( !m_file->IsOpened() )
|
||||
m_lasterror = wxSTREAM_READ_ERROR;
|
||||
}
|
||||
|
||||
wxFileInputStream::wxFileInputStream()
|
||||
@ -115,14 +117,7 @@ wxFileOutputStream::wxFileOutputStream(const wxString& fileName)
|
||||
m_file_destroy = true;
|
||||
|
||||
if (!m_file->IsOpened())
|
||||
{
|
||||
m_lasterror = wxSTREAM_WRITE_ERROR;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_file->Error())
|
||||
m_lasterror = wxSTREAM_WRITE_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
wxFileOutputStream::wxFileOutputStream(wxFile& file)
|
||||
|
Loading…
Reference in New Issue
Block a user