Commit 23fd1372 authored by twanvl's avatar twanvl

allow opening files from other packages

parent 8814e6f8
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// ----------------------------------------------------------------------------- : Includes // ----------------------------------------------------------------------------- : Includes
#include <util/io/package.hpp> #include <util/io/package.hpp>
#include <util/io/package_manager.hpp>
#include <util/error.hpp> #include <util/error.hpp>
#include <wx/wfstream.h> #include <wx/wfstream.h>
#include <wx/zipstrm.h> #include <wx/zipstrm.h>
...@@ -147,10 +148,10 @@ class ZipFileInputStream : private wxFileInputStream, public wxZipInputStream { ...@@ -147,10 +148,10 @@ class ZipFileInputStream : private wxFileInputStream, public wxZipInputStream {
}; };
InputStreamP Package::openIn(const String& file) { InputStreamP Package::openIn(const String& file) {
// if (!n.empty() && n.getChar(0) == _('/')) { if (!file.empty() && file.GetChar(0) == _('/')) {
// // absolute path, open file from another package // absolute path, open file from another package
// return packMan.openFileFromPackage(n); return packages.openFileFromPackage(file);
// } }
FileInfos::iterator it = files.find(toStandardName(file)); FileInfos::iterator it = files.find(toStandardName(file));
if (it == files.end()) { if (it == files.end()) {
throw FileNotFoundError(file, filename); throw FileNotFoundError(file, filename);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment