Allow mounted IFolders to be queried.

This commit is contained in:
Paul Chote
2013-05-19 19:14:20 +12:00
parent be3b18057a
commit de3d4da000
5 changed files with 21 additions and 28 deletions

View File

@@ -18,7 +18,7 @@ namespace OpenRA.FileFormats
{
public static class FileSystem
{
static List<IFolder> MountedFolders = new List<IFolder>();
public static List<IFolder> MountedFolders = new List<IFolder>();
static Cache<uint, List<IFolder>> allFiles = new Cache<uint, List<IFolder>>( _ => new List<IFolder>() );
@@ -80,10 +80,8 @@ namespace OpenRA.FileFormats
if (name.StartsWith("^"))
name = Platform.SupportDir+name.Substring(1);
if (Directory.Exists(name))
FolderPaths.Add(name);
var a = (Action)(() => FileSystem.MountInner(OpenPackage(name)));
FolderPaths.Add(name);
Action a = () => FileSystem.MountInner(OpenPackage(name));
if (optional)
try { a(); }