This commit is contained in:
Razmoth
2023-05-06 09:46:35 +04:00
parent 85ab8eec3c
commit 8e0f97ce2d
34 changed files with 903 additions and 864 deletions

View File

@@ -1,4 +1,5 @@
using System.IO;
using System;
using System.IO;
using System.Linq;
using static AssetStudio.ImportHelper;
@@ -172,7 +173,20 @@ namespace AssetStudio
}
if (reader.FileType == FileType.BundleFile && game.Type.IsBlockFile())
{
reader.FileType = FileType.BlockFile;
try
{
var signature = reader.ReadStringToNull();
reader.ReadInt32();
reader.ReadStringToNull();
reader.ReadStringToNull();
var size = reader.ReadInt64();
if (!(signature == "UnityFS" && size == reader.BaseStream.Length))
{
reader.FileType = FileType.BlockFile;
}
}
catch (Exception) { }
reader.Position = 0;
}
return reader;