From 5743b0257d5c0b0cf1567bf1e934fe4ea78cb6d7 Mon Sep 17 00:00:00 2001 From: Moritz Bender <35152647+Morilli@users.noreply.github.com> Date: Tue, 30 Mar 2021 20:51:28 +0200 Subject: [PATCH] Fix #2640 (#2687) --- src/BizHawk.Client.Common/savestates/ZipStateLoader.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs b/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs index 6320e47a42..4c1882f83c 100644 --- a/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs +++ b/src/BizHawk.Client.Common/savestates/ZipStateLoader.cs @@ -55,7 +55,7 @@ namespace BizHawk.Client.Common _entriesByName = new Dictionary(); foreach (var z in _zip.Entries) { - string name = z.Name; + string name = z.FullName; int i; if ((i = name.LastIndexOf('.')) != -1) { @@ -80,7 +80,7 @@ namespace BizHawk.Client.Common return null; } } - + try { ret._zip = new ZipArchive(new FileStream(filename, FileMode.Open, FileAccess.Read), ZipArchiveMode.Read); @@ -113,12 +113,12 @@ namespace BizHawk.Client.Common return true; } - + if (abort) { throw new Exception($"Essential zip section not found: {lump.ReadName}"); } - + return false; }