Implemented fallback functionality. Try to use System.IO.Compression.ZipArchive then fallback to SharpCompress (which is extremely slow).

Currently this hits disk 3 times per operation, needs performance tuning.
This commit is contained in:
Joseph Milazzo 2021-03-23 14:12:28 -05:00
parent 067b5174ab
commit 154b30c3fd
4 changed files with 154 additions and 38 deletions

View file

@ -14,6 +14,7 @@ namespace API.Archive
/// <returns></returns>
public static ArchiveLibrary CanOpen(string archivePath)
{
// TODO: Should I introduce something for NotFound?
if (!File.Exists(archivePath) || !Parser.Parser.IsArchive(archivePath)) return ArchiveLibrary.NotSupported;
try