[Scummvm-cvs-logs] scummvm master -> 78401ad55a60eb1eaafd1f0760caa4a50ec6a9a2

lordhoto lordhoto at gmail.com
Wed Nov 20 23:52:05 CET 2013


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
78401ad55a KYRA: Only pick up PAK and APK files in the game dir in Kyra1/EoB1.


Commit: 78401ad55a60eb1eaafd1f0760caa4a50ec6a9a2
    https://github.com/scummvm/scummvm/commit/78401ad55a60eb1eaafd1f0760caa4a50ec6a9a2
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2013-11-20T14:48:37-08:00

Commit Message:
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).

Changed paths:
    engines/kyra/resource.cpp



diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index c350c81..7a1abe8 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();






More information about the Scummvm-git-logs mailing list