]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_arc.cpp
restored (as deprecated) accidentally removed wx{Dir|File}Dialog::Get/SetStyle()
[wxWidgets.git] / src / common / fs_arc.cpp
index 9c92942c23bb9e44560abc63ffc9931a612065fb..a00e6accd7a13f68be036ae2af134b50003bba92 100644 (file)
     #include "wx/log.h"
 #endif
 
-#include "wx/archive.h"
+#if WXWIN_COMPATIBILITY_2_6
+    #include "wx/zipstrm.h"
+#else
+    #include "wx/archive.h"
+#endif
+
 #include "wx/private/fileback.h"
 
 //---------------------------------------------------------------------------
@@ -393,6 +398,12 @@ wxFSFile* wxArchiveFSHandler::OpenFile(
     s->OpenEntry(*entry);
 
     if (s && s->IsOk())
+    {
+#if WXWIN_COMPATIBILITY_2_6
+        if (factory->IsKindOf(CLASSINFO(wxZipClassFactory)))
+            ((wxZipInputStream*)s)->m_allowSeeking = true;
+#endif // WXWIN_COMPATIBILITY_2_6
+
         return new wxFSFile(s,
                             key + right,
                             GetMimeTypeFromExt(location),
@@ -401,6 +412,7 @@ wxFSFile* wxArchiveFSHandler::OpenFile(
                             , entry->GetDateTime()
 #endif // wxUSE_DATETIME
                             );
+    }
 
     delete s;
     return NULL;