From 6e9539157e656c6f70c02c6861c824b99674beb4 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Tue, 26 May 2020 14:08:10 +1000 Subject: [PATCH] Allow searching contents of .gz, .tar, and .rar archives not .tar.gz though, it thinks it's a nested archive and that's disallowed somewhere else --- .../SharpCompressDearchivalMethod.cs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs b/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs index 83725b25df..acdacd62b2 100644 --- a/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs +++ b/src/BizHawk.Client.Common/SharpCompressDearchivalMethod.cs @@ -1,5 +1,6 @@ #nullable enable +using System; using System.IO; using System.Linq; @@ -25,18 +26,12 @@ namespace BizHawk.Client.Common try { using var arcTest = ArchiveFactory.Open(fileName); - switch (arcTest.Type) - { - case ArchiveType.Zip: - case ArchiveType.SevenZip: - return true; - } } catch { - // ignored + return false; } - return false; + return true; // no exception? good enough } public SharpCompressArchiveFile Construct(string path) => new SharpCompressArchiveFile(path);