[Scummvm-cvs-logs] SF.net SVN: scummvm:[44560] scummvm/trunk/common

bluddy at users.sourceforge.net bluddy at users.sourceforge.net
Sat Oct 3 22:12:45 CEST 2009


Revision: 44560
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44560&view=rev
Author:   bluddy
Date:     2009-10-03 20:12:44 +0000 (Sat, 03 Oct 2009)

Log Message:
-----------
Fixed bug in archive.cpp that caused at least one engine (SAGA) not to work

Modified Paths:
--------------
    scummvm/trunk/common/archive.cpp
    scummvm/trunk/common/archive.h

Modified: scummvm/trunk/common/archive.cpp
===================================================================
--- scummvm/trunk/common/archive.cpp	2009-10-03 19:34:26 UTC (rev 44559)
+++ scummvm/trunk/common/archive.cpp	2009-10-03 20:12:44 UTC (rev 44560)
@@ -123,20 +123,23 @@
 	add(name, new FSDirectory(dir, depth, flat), priority);
 }
 
-void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String pattern, bool ignoreCase, int priority) {
+void SearchSet::addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority) {
 	FSList subDirs;
 	if (!directory.getChildren(subDirs))
 		return;
 
-	String nextPattern;
-	String::const_iterator sep = Common::find(pattern.begin(), pattern.end(), '/');
-	if (sep != pattern.end()) {
-		pattern = String(pattern.begin(), sep);
+	String nextPattern, pattern;
+	String::const_iterator sep = Common::find(origPattern.begin(), origPattern.end(), '/');
+	if (sep != origPattern.end()) {
+		pattern = String(origPattern.begin(), sep);
 
 		++sep;
-		if (sep != pattern.end())
-			nextPattern = String(sep, pattern.end());
+		if (sep != origPattern.end())
+			nextPattern = String(sep, origPattern.end());
 	}
+	else {
+		pattern = origPattern;
+	}
 
 	// TODO: The code we have for displaying all matches, which vary only in case, might
 	// be a bit overhead, but as long as we want to display all useful information to the

Modified: scummvm/trunk/common/archive.h
===================================================================
--- scummvm/trunk/common/archive.h	2009-10-03 19:34:26 UTC (rev 44559)
+++ scummvm/trunk/common/archive.h	2009-10-03 20:12:44 UTC (rev 44560)
@@ -212,7 +212,7 @@
 	 *
 	 * @see Common::matchString
 	 */
-	void addSubDirectoriesMatching(const FSNode &directory, String pattern, bool ignoreCase, int priority = 0);
+	void addSubDirectoriesMatching(const FSNode &directory, String origPattern, bool ignoreCase, int priority = 0);
 
 	/**
 	 * Remove an archive from the searchable set.


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list