]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wfstream.cpp
More _T() in asserts...
[wxWidgets.git] / src / common / wfstream.cpp
index 4bae72adc7e5c3a80090f382f41d7eca6f131731..50c662d35ceeb33dd33ac5ac4b31e4f244042f2a 100644 (file)
   #pragma hdrstop
 #endif
 
-#ifndef WX_PRECOMP
-  #include "wx/defs.h"
-#endif
-
 #if wxUSE_STREAMS && wxUSE_FILE
 
 #include <stdio.h>
-#include <wx/stream.h>
-#include <wx/wfstream.h>
+#include "wx/stream.h"
+#include "wx/wfstream.h"
 
 // ----------------------------------------------------------------------------
 // wxFileInputStream
@@ -142,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;
 }