]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_zip.cpp
fix from Robert
[wxWidgets.git] / src / common / fs_zip.cpp
index d390e17df0ea5120e0595d2311c8fe172ec5a280..e78ce297a0ffb5907a39631b6615f4d7ceb953e3 100644 (file)
@@ -17,7 +17,7 @@
 #pragma hdrstop
 #endif
 
 #pragma hdrstop
 #endif
 
-#if wxUSE_FS_ZIP
+#if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_ZIPSTREAM
 
 #ifndef WXPRECOMP
 #include "wx/wx.h"
 
 #ifndef WXPRECOMP
 #include "wx/wx.h"
@@ -82,9 +82,12 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l
         return new wxFSFile(s,
                             left + wxT("#zip:") + right,
                             GetMimeTypeFromExt(location),
         return new wxFSFile(s,
                             left + wxT("#zip:") + right,
                             GetMimeTypeFromExt(location),
-                            GetAnchor(location));
+                            GetAnchor(location),
+                            wxDateTime(wxFileModificationTime(left)));
     }
     }
-    else return NULL;
+
+    delete s;
+    return NULL;
 }
 
 
 }
 
 
@@ -112,7 +115,7 @@ wxString wxZipFSHandler::FindFirst(const wxString& spec, int flags)
     }
 
     m_ZipFile = left;
     }
 
     m_ZipFile = left;
-    m_Archive = (void*) unzOpen(m_ZipFile.fn_str());
+    m_Archive = (void*) unzOpen(m_ZipFile.mb_str());
     m_Pattern = right.AfterLast(wxT('/'));
     m_BaseDir = right.BeforeLast(wxT('/'));
 
     m_Pattern = right.AfterLast(wxT('/'));
     m_BaseDir = right.BeforeLast(wxT('/'));
 
@@ -176,4 +179,5 @@ wxString wxZipFSHandler::DoFind()
 
 
 
 
 
 
-#endif // wxUSE_FS_ZIP
+#endif 
+      //wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_ZIPSTREAM