From 267a7fc76eb911da1dd20243e269bdf3722564dd Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 24 Mar 2016 15:22:20 -0700 Subject: [PATCH] Fix how systems/sources are input as well as fixing file/folder input --- DATabase/Program.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/DATabase/Program.cs b/DATabase/Program.cs index 2be83322..cb790fee 100644 --- a/DATabase/Program.cs +++ b/DATabase/Program.cs @@ -40,14 +40,16 @@ namespace DATabase listsrc = listsrc || (arg == "-lsy"); norename = norename || (arg == "-nr" || arg == "--no-rename"); 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); + systems = (arg.StartsWith("system=") && systems == "" ? arg.Split('=')[1] : systems); + sources = (arg.StartsWith("source=") && sources == "" ? arg.Split('=')[1] : sources); // 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); + input = (arg.StartsWith("input=") && input == "" ? arg.Split('=')[1] : input); + input = (!arg.StartsWith("-") && !arg.StartsWith("source=") && !arg.StartsWith("system=") && !arg.StartsWith("input=") && input == "" ? arg : input); } + Console.WriteLine(input); + // If more than one switch is enabled, show the help screen if (!(help ^ import ^ generate ^ listsys ^ listsrc) || help) {