X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8a586e08eef0a5d09612f26f0e0c687cfac9963..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/common/file.cpp diff --git a/src/common/file.cpp b/src/common/file.cpp index a4b94e28ca..9985b9d448 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -356,7 +356,10 @@ bool wxFile::Flush() // seek wxFileOffset wxFile::Seek(wxFileOffset ofs, wxSeekMode mode) { - wxASSERT( IsOpened() ); + wxASSERT_MSG( IsOpened(), _T("can't seek on closed file") ); + wxCHECK_MSG( ofs != wxInvalidOffset || mode != wxFromStart, + wxInvalidOffset, + _T("invalid absolute file offset") ); int origin; switch ( mode ) { @@ -376,11 +379,6 @@ wxFileOffset wxFile::Seek(wxFileOffset ofs, wxSeekMode mode) break; } - if (ofs == wxInvalidOffset) - { - wxLogSysError(_("can't seek on file descriptor %d, large files support is not enabled."), m_fd); - return wxInvalidOffset; - } wxFileOffset iRc = wxSeek(m_fd, ofs, origin); if ( iRc == wxInvalidOffset ) {