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:
twanvl
2006-10-31 15:53:25 +00:00
parent f7a6d9e79d
commit fe27f2b770
+5 -4
View File
@@ -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);