Merge branch 'master' into patch-freeze-investigation

This commit is contained in:
Justin Swanson 2019-12-22 22:44:49 -06:00
commit 0e66b31f64

View File

@ -75,9 +75,12 @@ namespace Wabbajack.Lib.Downloaders
public async Task<bool> DoDownload(Archive a, string destination, bool download)
{
var parent = Directory.GetParent(destination);
if (download && !Directory.Exists(parent.FullName))
Directory.CreateDirectory(parent.FullName);
if (download)
{
var parent = Directory.GetParent(destination);
if (!Directory.Exists(parent.FullName))
Directory.CreateDirectory(parent.FullName);
}
using (var fs = download ? File.OpenWrite(destination) : null)
{