diff --git a/Src/Support/GoogleApis/Apis/[Media]/Download/MediaDownloader.cs b/Src/Support/GoogleApis/Apis/[Media]/Download/MediaDownloader.cs index f61a3ff735a..977aec4832d 100644 --- a/Src/Support/GoogleApis/Apis/[Media]/Download/MediaDownloader.cs +++ b/Src/Support/GoogleApis/Apis/[Media]/Download/MediaDownloader.cs @@ -243,7 +243,7 @@ private async Task DownloadCoreAsync(string url, Stream strea var request = new HttpRequestMessage(HttpMethod.Get, uri.ToString()); // Number of bytes sent to the caller's stream. - int bytesReturned = 0; + long bytesReturned = 0; try { @@ -275,7 +275,7 @@ private async Task DownloadCoreAsync(string url, Stream strea // Send one chunk to the caller's stream. int bytesToReturn = Math.Min(ChunkSize, buffer.Count); await stream.WriteAsync(buffer.Data, 0, bytesToReturn, cancellationToken).ConfigureAwait(false); - checked { bytesReturned += bytesToReturn; } + bytesReturned += bytesToReturn; buffer.RemoveFromFront(ChunkSize); if (buffer.IsEmpty)