mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-08-21 04:12:56 +00:00
Fixed file access after downloading the config plugin
This commit is contained in:
parent
ce0b936ed0
commit
ea41e84cf3
@ -43,8 +43,10 @@ public static partial class PluginFactory
|
|||||||
var response = await httpClient.GetAsync(downloadUrl, cancellationToken);
|
var response = await httpClient.GetAsync(downloadUrl, cancellationToken);
|
||||||
if (response.IsSuccessStatusCode)
|
if (response.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
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 configDirectory = Path.Join(CONFIGURATION_PLUGINS_ROOT, configPlugId.ToString());
|
var configDirectory = Path.Join(CONFIGURATION_PLUGINS_ROOT, configPlugId.ToString());
|
||||||
if(Directory.Exists(configDirectory))
|
if(Directory.Exists(configDirectory))
|
||||||
|
Loading…
Reference in New Issue
Block a user