From c5a23135f01697e5fb234988a314be57c9e245d5 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Tue, 27 Jul 2021 07:57:59 -0500 Subject: check for List<> to prevent regression --- src/slskd/Common/Configuration/CommandLineConfigurationSource.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/slskd/Common/Configuration/CommandLineConfigurationSource.cs') diff --git a/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs b/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs index d338eef6..0436c922 100644 --- a/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs +++ b/src/slskd/Common/Configuration/CommandLineConfigurationSource.cs @@ -94,9 +94,7 @@ namespace slskd.Configuration /// public override void Load() { - Console.WriteLine(CommandLine); var dictionary = Arguments.Parse(CommandLine, options => options.CombinableArguments = MultiValuedArguments).ArgumentDictionary; - Console.WriteLine(dictionary.ToJson()); void Map(Type type, string path) { @@ -125,7 +123,7 @@ namespace slskd.Configuration // Parse() will stuff multiple values into a List if the argument name is // in the list of those supporting multiple values, and more than one value was supplied. // detect this, and add the values to the target. - if (value.GetType().IsGenericType) + if (value.GetType().IsGenericType && value.GetType().GetGenericTypeDefinition() == typeof(List<>)) { var elements = (List)dictionary[argument]; -- cgit v1.2.3