aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}