1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-04-23 13:06:17 +02:00

Bumping up the version to fix download issue for files > 2 GB. (#775)

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

* Update license for cache

Co-authored-by: vsvipul <vsvipul@github.com>
This commit is contained in:
Ashwin Sangem 2022-03-30 15:33:23 +05:30 committed by GitHub
parent 2d8d0d1c9b
commit 7d4f40b464
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 77 additions and 162 deletions

3
dist/save/index.js vendored
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 {