mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
Fixed bug in archive.cpp that caused at least one engine (SAGA) not to work
svn-id: r44560
This commit is contained in:
parent
bbb3cc8086
commit
1336b5464b
@ -123,19 +123,22 @@ void SearchSet::addDirectory(const String &name, const FSNode &dir, int priority
|
||||
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
|
||||
|
@ -212,7 +212,7 @@ public:
|
||||
*
|
||||
* @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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user