Fix error on HTTPDownloader trying to download to non-existing destinations

Remove debug log call

Modify HTTPDownloader - put if into a twoliner

Add download into if statement
This commit is contained in:
trawzified 2019-12-18 11:45:48 +01:00
parent 02109a05bd
commit 1092345e2d

View File

@ -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();