diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2021-07-27 07:57:59 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2021-07-27 07:57:59 -0500 |
| commit | c5a23135f01697e5fb234988a314be57c9e245d5 (patch) | |
| tree | 5253fcd096de96c3bf8c1cd3a9af0f303f4cb41f /src/slskd/Common/Configuration/CommandLineConfigurationSource.cs | |
| parent | 58e6918f92163c99edf8eedb1a78e23bf2b039f8 (diff) | |
| download | slskd-c5a23135f01697e5fb234988a314be57c9e245d5.tar.gz | |
check for List<> to prevent regression
Diffstat (limited to 'src/slskd/Common/Configuration/CommandLineConfigurationSource.cs')
| -rw-r--r-- | src/slskd/Common/Configuration/CommandLineConfigurationSource.cs | 4 |
1 files changed, 1 insertions, 3 deletions
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 /// </summary> 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<T> 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<object>)dictionary[argument]; |
