mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix Mega downloader
This commit is contained in:
parent
0c75490055
commit
b95007f81a
@ -297,11 +297,12 @@ namespace Wabbajack
|
|||||||
public void OnDownloadUpdated(IWebBrowser chromiumWebBrowser, IBrowser browser, DownloadItem downloadItem,
|
public void OnDownloadUpdated(IWebBrowser chromiumWebBrowser, IBrowser browser, DownloadItem downloadItem,
|
||||||
IDownloadItemCallback callback)
|
IDownloadItemCallback callback)
|
||||||
{
|
{
|
||||||
if (_archive?.Size != 0 && downloadItem.TotalBytes != _archive?.Size)
|
if (_archive?.Size != null && _archive?.Size != 0 && downloadItem.TotalBytes != _archive?.Size)
|
||||||
{
|
{
|
||||||
_tcs.SetCanceled();
|
_tcs.TrySetCanceled();
|
||||||
Utils.Error(
|
Utils.Error(
|
||||||
$"Download of {_archive!.Name} (from {downloadItem.OriginalUrl}) aborted, selected file was {downloadItem.TotalBytes.ToFileSizeString()} expected size was {_archive!.Size.ToFileSizeString()}");
|
$"Download of {_archive!.Name} (from {downloadItem.OriginalUrl}) aborted, selected file was {downloadItem.TotalBytes.ToFileSizeString()} expected size was {_archive!.Size.ToFileSizeString()}");
|
||||||
|
callback.Cancel();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user