Add wxGetFileType and IsSeekable

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31924 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Wetherell
2005-02-11 12:39:03 +00:00
parent af44de02ae
commit 3c70014d96
21 changed files with 453 additions and 73 deletions

View File

@@ -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();