]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wfstream.cpp
corrected misleading comment about DllGetVersion()
[wxWidgets.git] / src / common / wfstream.cpp
index 9d15b4f9b65d501e7dd71a5bce998b04666b42fa..a142d44f7c49aba230b1160106220867a8b392a3 100644 (file)
@@ -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)