Move quickMode check and dispose streamResult

This commit is contained in:
Unnoen 2021-05-01 19:53:27 +10:00
parent d608df5074
commit 20e869a124
No known key found for this signature in database
GPG Key ID: 8F8E42252BA20553

View File

@ -250,10 +250,15 @@ namespace Wabbajack.Lib.Downloaders
return false; return false;
} }
if (quickMode)
{
streamResult.Dispose();
return true;
}
await using (var os = await path.Create()) await using (var os = await path.Create())
await using (var ins = await streamResult.Content.ReadAsStreamAsync()) await using (var ins = await streamResult.Content.ReadAsStreamAsync())
{ {
if (quickMode) return true;
if (a.Size == 0) if (a.Size == 0)
{ {
Utils.Status($"Downloading {a.Name}"); Utils.Status($"Downloading {a.Name}");