mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
fixed plugin loading bug where plugins vanish after being updated
This commit is contained in:
parent
6c3906b04c
commit
90f0f6964d
@ -305,9 +305,9 @@ public sealed class AssistantPluginInstallService
|
|||||||
await File.WriteAllTextAsync(tempFile, pluginCode, Encoding.UTF8, token);
|
await File.WriteAllTextAsync(tempFile, pluginCode, Encoding.UTF8, token);
|
||||||
|
|
||||||
if (File.Exists(pluginFile))
|
if (File.Exists(pluginFile))
|
||||||
File.Move(pluginFile, backupFile);
|
File.Replace(tempFile, pluginFile, backupFile);
|
||||||
|
else
|
||||||
File.Move(tempFile, pluginFile);
|
File.Move(tempFile, pluginFile);
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user