Refactor variable name in plugin download logic

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

View File

@ -18,14 +18,14 @@ public static partial class PluginFactory
await using var tempFileStream = File.Create(tempDownloadFile); await using var tempFileStream = File.Create(tempDownloadFile);
await response.Content.CopyToAsync(tempFileStream, cancellationToken); await response.Content.CopyToAsync(tempFileStream, cancellationToken);
var pluginDirectory = Path.Join(CONFIGURATION_PLUGINS_ROOT, configPlugId.ToString()); var configDirectory = Path.Join(CONFIGURATION_PLUGINS_ROOT, configPlugId.ToString());
if(Directory.Exists(pluginDirectory)) if(Directory.Exists(configDirectory))
Directory.Delete(pluginDirectory, true); Directory.Delete(configDirectory, true);
Directory.CreateDirectory(pluginDirectory); Directory.CreateDirectory(configDirectory);
ZipFile.ExtractToDirectory(tempDownloadFile, pluginDirectory); ZipFile.ExtractToDirectory(tempDownloadFile, configDirectory);
LOG.LogInformation($"Configuration plugin with ID='{configPlugId}' downloaded and extracted successfully to '{pluginDirectory}'."); LOG.LogInformation($"Configuration plugin with ID='{configPlugId}' downloaded and extracted successfully to '{configDirectory}'.");
} }
else else
LOG.LogError($"Failed to download the enterprise configuration plugin. HTTP Status: {response.StatusCode}"); LOG.LogError($"Failed to download the enterprise configuration plugin. HTTP Status: {response.StatusCode}");