diff --git a/lib/downloader.js b/lib/downloader.js index 3fae8e7..b1b6b1e 100644 --- a/lib/downloader.js +++ b/lib/downloader.js @@ -155,6 +155,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;