mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
allow opening files from other packages
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@65 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
// ----------------------------------------------------------------------------- : Includes
|
||||
|
||||
#include <util/io/package.hpp>
|
||||
#include <util/io/package_manager.hpp>
|
||||
#include <util/error.hpp>
|
||||
#include <wx/wfstream.h>
|
||||
#include <wx/zipstrm.h>
|
||||
@@ -147,10 +148,10 @@ class ZipFileInputStream : private wxFileInputStream, public wxZipInputStream {
|
||||
};
|
||||
|
||||
InputStreamP Package::openIn(const String& file) {
|
||||
// if (!n.empty() && n.getChar(0) == _('/')) {
|
||||
// // absolute path, open file from another package
|
||||
// return packMan.openFileFromPackage(n);
|
||||
// }
|
||||
if (!file.empty() && file.GetChar(0) == _('/')) {
|
||||
// absolute path, open file from another package
|
||||
return packages.openFileFromPackage(file);
|
||||
}
|
||||
FileInfos::iterator it = files.find(toStandardName(file));
|
||||
if (it == files.end()) {
|
||||
throw FileNotFoundError(file, filename);
|
||||
|
||||
Reference in New Issue
Block a user