mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 03:52:57 +00:00
Refactor variable name in plugin download logic
This commit is contained in:
parent
55ee5dacdb
commit
c29df9c77f
@ -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}");
|
||||||
|
Loading…
Reference in New Issue
Block a user