(ArcFile.TryOpen): compare against all extensions.

This commit is contained in:
morkt 2015-07-15 06:42:14 +04:00
parent 2a3c4fb005
commit 7fdaf03521

View File

@ -79,7 +79,7 @@ namespace GameRes
var range = FormatCatalog.Instance.LookupSignature<ArchiveFormat> (signature); var range = FormatCatalog.Instance.LookupSignature<ArchiveFormat> (signature);
// check formats that match filename extension first // check formats that match filename extension first
if (range.Skip(1).Any()) // if range.Count() > 1 if (range.Skip(1).Any()) // if range.Count() > 1
range = range.OrderByDescending (f => f.Extensions.Any() && f.Extensions.First() == ext.Value); range = range.OrderByDescending (f => f.Extensions.Any (e => e == ext.Value));
foreach (var impl in range) foreach (var impl in range)
{ {
try try