From fe27f2b77042973d473abcaeb53073687d8b5f0e Mon Sep 17 00:00:00 2001 From: twanvl Date: Tue, 31 Oct 2006 15:53:25 +0000 Subject: [PATCH] allow opening files from other packages git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@65 0fc631ac-6414-0410-93d0-97cfa31319b6 --- src/util/io/package.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/util/io/package.cpp b/src/util/io/package.cpp index 498423da..5504f190 100644 --- a/src/util/io/package.cpp +++ b/src/util/io/package.cpp @@ -7,6 +7,7 @@ // ----------------------------------------------------------------------------- : Includes #include +#include #include #include #include @@ -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);