Give folders higher priority than packages in FileSystem. Also fixes bug where folder contents were not being cached with the correct hash.

This commit is contained in:
Matthew Bowra-Dean
2010-10-19 02:59:39 +13:00
committed by Chris Forbes
parent f6df7a06f2
commit 2bcf33661a
4 changed files with 36 additions and 9 deletions

View File

@@ -28,12 +28,18 @@ namespace OpenRA.FileFormats
public IEnumerable<uint> AllFileHashes()
{
foreach( var filename in Directory.GetFiles( path, "*", SearchOption.TopDirectoryOnly ) )
yield return PackageEntry.HashFilename( filename );
yield return PackageEntry.HashFilename( Path.GetFileName(filename) );
}
public bool Exists(string filename)
{
return File.Exists(Path.Combine(path,filename));
}
public int Priority
{
get { return 100; }
}
}
}