Skip to content

Commit

Permalink
Add all previous functionality to TcpFileDownloader
Browse files Browse the repository at this point in the history
  • Loading branch information
villermen committed May 3, 2017
1 parent bb494cf commit 3341fe2
Show file tree
Hide file tree
Showing 2 changed files with 173 additions and 162 deletions.
4 changes: 2 additions & 2 deletions RuneScapeCacheTools/Cache/Downloader/HttpFileDownloader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public async Task<BinaryFile> DownloadFileAsync(Index index, int fileId, CacheFi
throw new DownloaderException($"HTTP interface responded with status code: {response.StatusCode}.");
}

if (response.ContentLength != fileInfo.CompressedSize - 2)
if (response.ContentLength != fileInfo.CompressedSize)
{
throw new DownloaderException($"Downloaded file size {response.ContentLength} does not match expected {fileInfo.CompressedSize - 2}.");
throw new DownloaderException($"Downloaded file size {response.ContentLength} does not match expected {fileInfo.CompressedSize}.");
}

var dataStream = new MemoryStream();
Expand Down
Loading

0 comments on commit 3341fe2

Please sign in to comment.