Fix URL formatting in plugin download logic

This commit is contained in:
Thorsten Sommer 2025-06-02 15:17:08 +02:00
parent 26aeed692c
commit 55ee5dacdb
No known key found for this signature in database
GPG Key ID: B0B7E2FC074BF1F5

View File

@ -11,7 +11,8 @@ public static partial class PluginFactory
try
{
using var httpClient = new HttpClient();
var response = await httpClient.GetAsync($"{configServerUrl}/{configPlugId}.zip", cancellationToken);
var serverUrl = configServerUrl.EndsWith('/') ? configServerUrl[..^1] : configServerUrl;
var response = await httpClient.GetAsync($"{serverUrl}/{configPlugId}.zip", cancellationToken);
if (response.IsSuccessStatusCode)
{
await using var tempFileStream = File.Create(tempDownloadFile);