Plugins: Fix plugin installer

This commit is contained in:
Kukks 2022-04-01 13:20:19 +02:00
parent 4a1580169d
commit e201ddd74c
No known key found for this signature in database
GPG Key ID: 8E5530D9D1C93097
2 changed files with 5 additions and 1 deletions

View File

@ -216,6 +216,10 @@ namespace BTCPayServer.Plugins
case "delete":
ExecuteCommand(("enable", command.extension), pluginsFolder, true);
if (File.Exists(dirName))
{
File.Delete(dirName);
}
if (Directory.Exists(dirName))
{
Directory.Delete(dirName, true);

View File

@ -92,7 +92,7 @@ namespace BTCPayServer.Plugins
{
var dest = _dataDirectories.Value.PluginDir;
var filedest = Path.Join(dest, plugin);
var filedest = Path.Join(dest, plugin+".btcpay");
Directory.CreateDirectory(Path.GetDirectoryName(filedest));
using var resp2 = await _githubClient.GetAsync(path);
using var fs = new FileStream(filedest, FileMode.Create, FileAccess.ReadWrite);