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
This commit is contained in:
parent
7ae94c4300
commit
6e9539157e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue