mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Merge pull request #291 from tr4wzified/downloader-fix
Fix error on HTTPDownloader trying to download to non-existing destinations
This commit is contained in:
commit
3184cdc793
@ -75,6 +75,9 @@ namespace Wabbajack.Lib.Downloaders
|
||||
|
||||
public async Task<bool> DoDownload(Archive a, string destination, bool download)
|
||||
{
|
||||
if (download && !Directory.Exists(Directory.GetParent(destination).FullName))
|
||||
Directory.CreateDirectory(Directory.GetParent(destination).FullName);
|
||||
|
||||
using (var fs = download ? File.OpenWrite(destination) : null)
|
||||
{
|
||||
var client = Client ?? new HttpClient();
|
||||
|
Loading…
x
Reference in New Issue
Block a user