mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Removed extra HTTPDownloader folder creation call
This commit is contained in:
parent
b392b667cf
commit
cf73a2af2f
@ -75,8 +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);
|
||||
var parent = Directory.GetParent(destination);
|
||||
if (download && !Directory.Exists(parent.FullName))
|
||||
Directory.CreateDirectory(parent.FullName);
|
||||
|
||||
using (var fs = download ? File.OpenWrite(destination) : null)
|
||||
{
|
||||
@ -120,12 +121,6 @@ namespace Wabbajack.Lib.Downloaders
|
||||
|
||||
var contentSize = headerVar != null ? long.Parse(headerVar) : 1;
|
||||
|
||||
FileInfo fileInfo = new FileInfo(destination);
|
||||
if (!fileInfo.Directory.Exists)
|
||||
{
|
||||
Directory.CreateDirectory(fileInfo.Directory.FullName);
|
||||
}
|
||||
|
||||
using (var webs = stream)
|
||||
{
|
||||
var buffer = new byte[bufferSize];
|
||||
|
Loading…
Reference in New Issue
Block a user