X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d1af991f497a5e95d8f8ab15a4e4a4a4c375928f..a58d5df4ef7fbbbb1c385ac63038608d49f8dfa5:/src/common/wfstream.cpp?ds=sidebyside diff --git a/src/common/wfstream.cpp b/src/common/wfstream.cpp index 599c2f2fad..3bf2a080ba 100644 --- a/src/common/wfstream.cpp +++ b/src/common/wfstream.cpp @@ -67,7 +67,7 @@ char wxFileInputStream::Peek() return 0; } -size_t wxFileInputStream::StreamSize() const +size_t wxFileInputStream::GetSize() const { return m_file->Length(); } @@ -138,7 +138,10 @@ wxFileOutputStream::~wxFileOutputStream() size_t wxFileOutputStream::OnSysWrite(const void *buffer, size_t size) { size_t ret = m_file->Write(buffer, size); - m_lasterror = wxStream_EOF; // TODO + if (m_file->Error()) + m_lasterror = wxStream_WRITE_ERR; + else + m_lasterror = wxStream_NOERROR; return ret; } @@ -158,7 +161,7 @@ void wxFileOutputStream::Sync() m_file->Flush(); } -size_t wxFileOutputStream::StreamSize() const +size_t wxFileOutputStream::GetSize() const { return m_file->Length(); }