From 1a52a3a205c84e12904a35c4eb39035af1237897 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 2 Apr 2021 22:20:15 -0700 Subject: [PATCH] Add Check parameter for compression --- MPF.Check/Program.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MPF.Check/Program.cs b/MPF.Check/Program.cs index 061715cd..4d5f4f77 100644 --- a/MPF.Check/Program.cs +++ b/MPF.Check/Program.cs @@ -65,7 +65,7 @@ namespace MPF.Check string username = null, password = null; string internalProgram = "DiscImageCreator"; string path = string.Empty; - bool scan = false; + bool scan = false, compress = false; // Loop through and process options int startIndex = 2; @@ -113,6 +113,12 @@ namespace MPF.Check scan = true; } + // Compress log and extraneous files + else if (args[startIndex].StartsWith("-z") || args[startIndex].StartsWith("--zip")) + { + compress = true; + } + // Default, we fall out else { @@ -160,6 +166,7 @@ namespace MPF.Check InternalProgram = Converters.ToInternalProgram(internalProgram), ScanForProtection = scan && !string.IsNullOrWhiteSpace(path), PromptForDiscInformation = false, + CompressLogFiles = compress, RedumpUsername = username, RedumpPassword = password, @@ -200,6 +207,7 @@ namespace MPF.Check Console.WriteLine("-u, --use Dumping program output type"); Console.WriteLine("-p, --path Physical drive path for additional checks"); Console.WriteLine("-s, --scan Enable copy protection scan (requires --path)"); + Console.WriteLine("-z, --zip Enable log file compression"); Console.WriteLine(); }