[Scummvm-cvs-logs] SF.net SVN: scummvm:[52121] scummvm/trunk/common/fs.cpp

sev at users.sourceforge.net sev at users.sourceforge.net
Mon Aug 16 15:19:22 CEST 2010


Revision: 52121
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52121&view=rev
Author:   sev
Date:     2010-08-16 13:19:21 +0000 (Mon, 16 Aug 2010)

Log Message:
-----------
OSYSTEM: Add directories to archive list just as in other variants

Modified Paths:
--------------
    scummvm/trunk/common/fs.cpp

Modified: scummvm/trunk/common/fs.cpp
===================================================================
--- scummvm/trunk/common/fs.cpp	2010-08-16 13:00:41 UTC (rev 52120)
+++ scummvm/trunk/common/fs.cpp	2010-08-16 13:19:21 UTC (rev 52121)
@@ -322,6 +322,19 @@
 			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;
 }
 
@@ -342,6 +355,15 @@
 		++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;
 }
 


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