X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8fbc92bdb84f34fc7306266b116ebd2da28c950..8f248607e5557858399a0d13b077a49014df8fbc:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index 4aa752940c..63b941e3a4 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -1351,6 +1351,9 @@ bool wxZipInputStream::LoadEndRecord() // bool wxZipInputStream::FindEndRecord() { + if (!m_parent_i_stream->IsSeekable()) + return false; + // usually it's 22 bytes in size and the last thing in the file { wxLogNull nolog; @@ -1917,7 +1920,7 @@ bool wxZipOutputStream::DoCreate(wxZipEntry *entry, bool raw /*=false*/) ds << LOCAL_MAGIC; // and if this is the first entry test for seekability - if (m_headerOffset == 0) { + if (m_headerOffset == 0 && m_parent_o_stream->IsSeekable()) { bool logging = wxLog::IsEnabled(); wxLogNull nolog; wxFileOffset here = m_parent_o_stream->TellO();