From 7f3bf70229e65211482b42f930b96e92803550d3 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Thu, 16 Jan 2025 17:31:16 +0100 Subject: [PATCH] bump various packages --- Directory.Packages.props | 12 ++++++------ .../SharpCompressDearchivalMethod.cs | 7 ++----- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index fdc40fa2caf..0d17860ccc4 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,6 +1,6 @@ - + @@ -9,7 +9,7 @@ - + @@ -18,12 +18,12 @@ - + - + @@ -37,11 +37,11 @@ - + - + diff --git a/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs b/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs index 3ce5f8b2478..1b31e9e456b 100644 --- a/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs +++ b/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs @@ -21,8 +21,7 @@ public bool CheckSignature(string fileName, out int offset, out bool isExecutabl offset = 0; isExecutable = false; - bool isArchive = ArchiveFactory.IsArchive(fileName, out var type); - if (!isArchive) return false; + if (!ArchiveFactory.IsArchive(fileName, out var type)) return false; if (type is not ArchiveType.Tar) return true; // not expecting false positives from anything but .tar for now // SharpCompress seems to overzealously flag files it thinks are the in original .tar format, so we'll check for false positives. This affects 0.24.0, and the latest at time of writing, 0.27.1. @@ -47,9 +46,7 @@ public bool CheckSignature(Stream fileStream, string? filenameHint) if (!fileStream.CanRead || !fileStream.CanSeek) return false; long initialPosition = fileStream.Position; - bool isArchive = ArchiveFactory.IsArchive(fileStream, out var type); - fileStream.Seek(initialPosition, SeekOrigin.Begin); - if (!isArchive) return false; + if (!ArchiveFactory.IsArchive(fileStream, out var type)) return false; if (type is not ArchiveType.Tar) return true; // not expecting false positives from anything but .tar for now // as above, SharpCompress seems to overzealously flag files it thinks are the in original .tar format, so we'll check for false positives