From d94ca804eaa9346db33f652bfcac0cb3ceb84b0a Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Thu, 7 Aug 2025 11:24:10 +0200 Subject: [PATCH] Fixed CodeQL compile issue + a warning --- Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs | 2 +- Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs index f7a4b6fa9..7626e8548 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/HttpServerConnection.cs @@ -148,7 +148,7 @@ namespace Duplicati.GUI.TrayIcon var acceptedCertificates = new HashSet(StringComparer.OrdinalIgnoreCase); if (!string.IsNullOrWhiteSpace(acceptedHostCertificate)) - acceptedCertificates.UnionWith(acceptedHostCertificate.Split([',', ';'], + acceptedCertificates.UnionWith(acceptedHostCertificate.Split(new char[] { ',', ';' }, StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries)); HTTPCLIENT = new(new HttpClientHandler diff --git a/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs b/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs index c14caefaf..7091c4950 100644 --- a/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs +++ b/Duplicati/Library/Backend/OpenStack/OpenStackStorage.cs @@ -418,7 +418,7 @@ public class OpenStackStorage : IStreamingBackend yield break; // Prepare next listing entry - url = plainurl + $"&marker={Uri.UrlEncode(items.Last().name)}"; + url = plainurl + $"&marker={Uri.UrlEncode(items.Last().name ?? "")}"; } }