aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorEugene Sandulenko2010-08-16 18:07:21 +0000
committerEugene Sandulenko2010-08-16 18:07:21 +0000
commiteff2623f1042ea88df8c748ccae7fffca591bb87 (patch)
tree2356f4ebf9fef728b5c35518ad9d092a09eedf31 /common
parent4c3618e6457341d3e65ac7501ef1fbdc479c13be (diff)
downloadscummvm-rg350-eff2623f1042ea88df8c748ccae7fffca591bb87.tar.gz
scummvm-rg350-eff2623f1042ea88df8c748ccae7fffca591bb87.tar.bz2
scummvm-rg350-eff2623f1042ea88df8c748ccae7fffca591bb87.zip
OSYSTEM: revert r52120 and r52121. Introduced regressions
svn-id: r52127
Diffstat (limited to 'common')
-rw-r--r--common/fs.cpp34
1 files changed, 2 insertions, 32 deletions
diff --git a/common/fs.cpp b/common/fs.cpp
index b65d03a690..87067df2cc 100644
--- a/common/fs.cpp
+++ b/common/fs.cpp
@@ -314,27 +314,10 @@ int FSDirectory::listMatchingMembers(ArchiveMemberList &list, const String &patt
NodeCache::iterator it = _fileCache.begin();
for ( ; it != _fileCache.end(); ++it) {
if (it->_key.matchString(lowercasePattern, false, true)) {
- if (_flat)
- list.push_back(ArchiveMemberPtr(new FSNode(it->_value)));
- else
- list.push_back(ArchiveMemberPtr(new FSNode(it->_key)));
-
+ list.push_back(ArchiveMemberPtr(new FSNode(it->_value)));
matches++;
}
}
-
- // If non-flat directory was created, include directories in the match too
- if (!_flat) {
- it = _subDirCache.begin();
- for ( ; it != _subDirCache.end(); ++it) {
- if (it->_key.matchString(lowercasePattern, false, true)) {
- list.push_back(ArchiveMemberPtr(new FSNode(it->_key + "/")));
-
- matches++;
- }
- }
- }
-
return matches;
}
@@ -347,23 +330,10 @@ int FSDirectory::listMembers(ArchiveMemberList &list) {
int files = 0;
for (NodeCache::iterator it = _fileCache.begin(); it != _fileCache.end(); ++it) {
- if (_flat)
- list.push_back(ArchiveMemberPtr(new FSNode(it->_value)));
- else
- list.push_back(ArchiveMemberPtr(new FSNode(it->_key)));
-
+ list.push_back(ArchiveMemberPtr(new FSNode(it->_value)));
++files;
}
- // If non-flat directory was created, include directories in the list too
- if (!_flat) {
- for (NodeCache::iterator it = _subDirCache.begin(); it != _subDirCache.end(); ++it) {
- list.push_back(ArchiveMemberPtr(new FSNode(it->_key + "/")));
-
- ++files;
- }
- }
-
return files;
}