Fix broken state

This commit is contained in:
Timothy Baldridge 2020-01-03 12:39:36 -07:00
parent f1c0ee1f2b
commit 0cb4e61150

View File

@ -51,8 +51,9 @@ namespace Wabbajack.Lib.Downloaders
public async Task Download(string destination)
{
if (!Directory.Exists(Path.GetDirectoryName(destination)))
Directory.CreateDirectory(Path.GetDirectoryName(destination));
var path = Path.GetDirectoryName(destination);
if (!string.IsNullOrEmpty(path) && !Directory.Exists(path))
Directory.CreateDirectory(path);
await Download(new Archive {Name = Path.GetFileName(destination)}, destination);
}