From 3680e12dc854564fd548f022c8c24069695eb874 Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Mon, 27 Jul 2020 19:14:50 +0000 Subject: [PATCH] Better message when ZipFile.TestArchive throws NotSupportedException --- Core/Net/NetFileCache.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Core/Net/NetFileCache.cs b/Core/Net/NetFileCache.cs index 68faaf8e4d..87a2360660 100644 --- a/Core/Net/NetFileCache.cs +++ b/Core/Net/NetFileCache.cs @@ -467,6 +467,12 @@ public static bool ZipValid(string filename, out string invalidReason) invalidReason = ex.Message; return false; } + catch (NotSupportedException nse) when (Platform.IsMono) + { + // SharpZipLib throws this if your locale isn't installed on Mono + invalidReason = $"{nse.Message}\r\n\r\nInstall the `mono-complete` package or equivalent for your operating system."; + return false; + } } ///