Bumping up the version to fix download issue for files > 2 GB.

This commit is contained in:
Ashwin Sangem 2022-03-25 05:07:58 +00:00 committed by GitHub
parent 2d8d0d1c9b
commit 0ea82e14e9
5 changed files with 76 additions and 161 deletions

View file

@ -5519,7 +5519,8 @@ function downloadCacheStorageSDK(archiveLocation, archivePath, options) {
//
// If the file exceeds the buffer maximum length (~1 GB on 32-bit systems and ~2 GB
// on 64-bit systems), split the download into multiple segments
const maxSegmentSize = buffer.constants.MAX_LENGTH;
// ~2 GB = 2147483647, beyond this, we start getting out of range error. So, capping it accordingly.
const maxSegmentSize = Math.min(2147483647, buffer.constants.MAX_LENGTH);
const downloadProgress = new DownloadProgress(contentLength);
const fd = fs.openSync(archivePath, 'w');
try {