aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2013-11-20 23:33:22 +0100
committerJohannes Schickel2013-11-20 23:48:37 +0100
commit78401ad55a60eb1eaafd1f0760caa4a50ec6a9a2 (patch)
treed87e3a705b00e2decd3166eaa29cb3e6ee1c0117 /engines
parent4e2b1f02001676663d9c66c3809bbc234519ee88 (diff)
downloadscummvm-rg350-78401ad55a60eb1eaafd1f0760caa4a50ec6a9a2.tar.gz
scummvm-rg350-78401ad55a60eb1eaafd1f0760caa4a50ec6a9a2.tar.bz2
scummvm-rg350-78401ad55a60eb1eaafd1f0760caa4a50ec6a9a2.zip
KYRA: Only pick up PAK and APK files in the game dir in Kyra1/EoB1.
This should fix annoying erroring out when invalid PAK or APK files are in the CWD (like for example some Android package files).
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/resource.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index c350c81742..7a1abe8dd9 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -74,10 +74,14 @@ bool Resource::reset() {
loadProtectedFiles(list);
} else {
+ // We only search in the game path to avoid any invalid PAK or
+ // APK files from being picked up. This might happen, for example,
+ // when the user has an Android package file in the CWD.
+ Common::FSDirectory gameDir(dir);
Common::ArchiveMemberList files;
- _files.listMatchingMembers(files, "*.PAK");
- _files.listMatchingMembers(files, "*.APK");
+ gameDir.listMatchingMembers(files, "*.PAK");
+ gameDir.listMatchingMembers(files, "*.APK");
for (Common::ArchiveMemberList::const_iterator i = files.begin(); i != files.end(); ++i) {
Common::String name = (*i)->getName();