From 286589478c280e625234b5da27c895d488adc415 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Tue, 16 May 2017 04:28:02 +0100 Subject: [PATCH] Do not use DotNetZip to check if file is a ZIP. This library doesn't work with Xamarin.Mac. --- osrepodbmgr.Core/Workers.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osrepodbmgr.Core/Workers.cs b/osrepodbmgr.Core/Workers.cs index 67f047d..403106e 100644 --- a/osrepodbmgr.Core/Workers.cs +++ b/osrepodbmgr.Core/Workers.cs @@ -1148,7 +1148,7 @@ namespace osrepodbmgr.Core return; } - if(ZipFile.IsZipFile(Context.path)) + if(Context.archiveFormat == "Zip") { Context.unzipWithUnAr = true; ZipFile zf = ZipFile.Read(Context.path, new ReadOptions { Encoding = Encoding.UTF8 }); @@ -1215,7 +1215,7 @@ namespace osrepodbmgr.Core try { // If it's a ZIP file not created by Mac OS X, use DotNetZip to uncompress (unar freaks out or corrupts certain ZIP features) - if(ZipFile.IsZipFile(Context.path) && !Context.unzipWithUnAr) + if(Context.archiveFormat == "Zip" && !Context.unzipWithUnAr) { try {