From 4b53969ba05ab4b507c559d208c666eaae1b7240 Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Tue, 22 Dec 2020 04:50:12 +0100 Subject: [PATCH] IL2CPP: Don't read lock archive files when loading --- Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs b/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs index 78a45cc..91a441c 100644 --- a/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs +++ b/Il2CppInspector.Common/IL2CPP/Il2CppInspector.cs @@ -489,7 +489,7 @@ namespace Il2CppInspector public static (MemoryStream Metadata, MemoryStream Binary)? GetStreamsFromPackage(IEnumerable packageFiles, bool silent = false) { // Check every item is a zip file first because ZipFile.OpenRead is extremely slow if it isn't foreach (var file in packageFiles) - using (BinaryReader zipTest = new BinaryReader(File.Open(file, FileMode.Open))) { + using (BinaryReader zipTest = new BinaryReader(File.Open(file, FileMode.Open, FileAccess.Read, FileShare.Read))) { if (zipTest.ReadUInt32() != 0x04034B50) return null; }