diff --git a/lib/downloader.js b/lib/downloader.js index 3f94c98..0c56cc3 100644 --- a/lib/downloader.js +++ b/lib/downloader.js @@ -175,6 +175,9 @@ function reset() { } function doLru(size) { + if (size > MAX_SPACE_IN_B) { + return Promise.reject() + } return new Promise((resolve, reject) => { let totalSize = savedFiles[KEY_TOTAL_SIZE] ? savedFiles[KEY_TOTAL_SIZE] : 0;