Fix warnings

This commit is contained in:
nicolas.dorier
2021-12-27 13:46:31 +09:00
parent 259f0b5aad
commit c0e9f91bdc
15 changed files with 115 additions and 130 deletions

View File

@@ -63,7 +63,10 @@ namespace BTCPayServer.Plugins
}
var filedest = Path.Join(dest, ext.Name);
Directory.CreateDirectory(Path.GetDirectoryName(filedest));
new WebClient().DownloadFile(new Uri(ext.DownloadUrl), filedest);
using var resp2 = await _githubClient.GetAsync(ext.DownloadUrl);
using var fs = new FileStream(filedest, FileMode.Create, FileAccess.ReadWrite);
await resp2.Content.CopyToAsync(fs);
await fs.FlushAsync();
}
public void InstallPlugin(string plugin)