From 1949511cee2e52df606dbbb9fb7e2f1cb2de2bd6 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 24 Mar 2016 14:53:27 -0700 Subject: [PATCH] Update input name handling further --- DATabase/Program.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/DATabase/Program.cs b/DATabase/Program.cs index ff33fe3c..ee970d4e 100644 --- a/DATabase/Program.cs +++ b/DATabase/Program.cs @@ -42,7 +42,10 @@ namespace DATabase old = old || (arg == "-old" || arg == "--old"); systems = (arg.Split('=')[0] == "system" && systems == "" ? arg.Split('=')[1] : systems); sources = (arg.Split('=')[0] == "source" && sources == "" ? arg.Split('=')[1] : sources); - input = (!arg.StartsWith("-") && !arg.StartsWith("source=") && !arg.StartsWith("system=") ? arg : ""); + + // Take care of the two distinct input name possibilites; prioritize the input tag + input = (arg.Split('=')[0] == "input" && input == "" ? arg.Split('=')[1] : input); + input = (!arg.StartsWith("-") && !arg.StartsWith("source=") && !arg.StartsWith("system=") && input != "" ? arg : input); } // If more than one switch is enabled, show the help screen @@ -277,7 +280,7 @@ CREATE TABLE IF NOT EXISTS systems ( Console.Write(@" DATabase - Import and Generate DAT files ----------------------------------------- -Usage: DATabase