From d9d427e27656b6f4b97dcf8d518f7c37ada42e52 Mon Sep 17 00:00:00 2001 From: Carl Johnsen Date: Fri, 7 Feb 2025 09:08:38 +0100 Subject: [PATCH] With the new parser, the options are no longer nullable --- Tools/RemoteSynchronization/Program.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Tools/RemoteSynchronization/Program.cs b/Tools/RemoteSynchronization/Program.cs index 9a5b8e4af..0586d8daf 100644 --- a/Tools/RemoteSynchronization/Program.cs +++ b/Tools/RemoteSynchronization/Program.cs @@ -139,9 +139,8 @@ destination will be verified before being overwritten (if they seemingly match). { // Unpack and parse the multi token options Dictionary global_options = config.GlobalOptions - ?.Select(x => x.Split("=")) - .ToDictionary(x => x[0], x => x[1]) - ?? []; + .Select(x => x.Split("=")) + .ToDictionary(x => x[0], x => x[1]); // Parse the log level var log_level_parsed = Enum.TryParse(config.LogLevel, true, out var log_level_enum); @@ -166,13 +165,12 @@ destination will be verified before being overwritten (if they seemingly match). using var _ = Duplicati.Library.Logging.Log.StartScope(multi_sink, log_level_enum); Dictionary src_opts = config.SrcOptions - ?.Select(x => x.Split("=")) - .ToDictionary(x => x[0], x => x[1]) - ?? []; + .Select(x => x.Split("=")) + .ToDictionary(x => x[0], x => x[1]); + Dictionary dst_opts = config.DstOptions - ?.Select(x => x.Split("=")) - .ToDictionary(x => x[0], x => x[1]) - ?? []; + .Select(x => x.Split("=")) + .ToDictionary(x => x[0], x => x[1]); // Merge the global options into the source and destination options foreach (var x in global_options)