From 81f5594c84a7a7b78bdce923f2f1d14d9d955dd8 Mon Sep 17 00:00:00 2001 From: Miepee Date: Tue, 17 Jan 2023 01:02:30 +0100 Subject: [PATCH] Fix people unabe to provide zips that dont end in ".zip" --- AM2RPortHelperCLI/Program.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AM2RPortHelperCLI/Program.cs b/AM2RPortHelperCLI/Program.cs index 5c17c9e..a27c8fc 100644 --- a/AM2RPortHelperCLI/Program.cs +++ b/AM2RPortHelperCLI/Program.cs @@ -155,7 +155,7 @@ internal static class Program if (File.Exists(androidPath)) File.Delete(androidPath); - // TODO: ask for modname + // TODO: ask for modname - temp until the other todo is fixed where it gets taht automatically bool? internetSelected = null; do { @@ -186,10 +186,10 @@ internal static class Program Console.WriteLine("Successfully finished!"); } - // TODO: we should probably check for magic header instead of just file extension + // We want people to also provide zips that don't end in .zip. If it turns out to not be a zip, it'll still throw later. private static bool IsValidInputZip(string path) { - return path != null && (File.Exists(path) || Path.GetExtension(path).ToLower() == ".zip"); + return path != null && (File.Exists(path)); } private static bool IsValidInputZip(FileInfo path)