From 76806f59067a98cd004359c1f83021c36c7b6d3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Thu, 27 Mar 2003 20:06:20 +0000 Subject: [PATCH] fixed loading of resource from ZIP files on MacOS git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/src/xrc/xmlres.cpp | 3 ++- docs/toback24.txt | 4 ++++ src/xrc/xmlres.cpp | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/contrib/src/xrc/xmlres.cpp b/contrib/src/xrc/xmlres.cpp index dc9a434c95..52d9881e13 100644 --- a/contrib/src/xrc/xmlres.cpp +++ b/contrib/src/xrc/xmlres.cpp @@ -121,7 +121,8 @@ bool wxXmlResource::Load(const wxString& filemask) if (fnd.Lower().Matches(wxT("*.zip")) || fnd.Lower().Matches(wxT("*.xrs"))) { - rt = rt && Load(fnd + wxT("#zip:*.xrc")); + wxString url(wxFileSystem::FileNameToURL(fnd)); + rt = rt && Load(url + wxT("#zip:*.xrc")); } else #endif diff --git a/docs/toback24.txt b/docs/toback24.txt index 72859d77f1..24593642f9 100644 --- a/docs/toback24.txt +++ b/docs/toback24.txt @@ -165,6 +165,10 @@ Must be modified to be binary compatible before backporting! Checking in xmlres.cpp; /pack/cvsroots/wxwindows/wxWindows/contrib/src/xrc/xmlres.cpp,v <-- xmlres.cpp new revision: 1.27; previous revision: 1.26 +done + +(also revision 1.30->1.31 of xmlres.cpp !!!) + Checking in xmlres.h; /pack/cvsroots/wxwindows/wxWindows/contrib/include/wx/xrc/xmlres.h,v <-- xmlres.h new revision: 1.22; previous revision: 1.21 diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index dc9a434c95..52d9881e13 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -121,7 +121,8 @@ bool wxXmlResource::Load(const wxString& filemask) if (fnd.Lower().Matches(wxT("*.zip")) || fnd.Lower().Matches(wxT("*.xrs"))) { - rt = rt && Load(fnd + wxT("#zip:*.xrc")); + wxString url(wxFileSystem::FileNameToURL(fnd)); + rt = rt && Load(url + wxT("#zip:*.xrc")); } else #endif