mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-21 14:04:12 +01:00
Plugins: Fix plugin installer
This commit is contained in:
parent
4a1580169d
commit
e201ddd74c
2 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue