Do not use DotNetZip to check if file is a ZIP. This library doesn't

work with Xamarin.Mac.
This commit is contained in:
2017-05-16 04:28:02 +01:00
parent 93adbb77ac
commit 286589478c

View File

@@ -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
{