Skip to content

Commit 09723ce

Browse files
ronjouchnodkz
authored andcommitted
fix: MD5 check failing due to validating minimum size for MD5 file itself
Also, - Fix TS typings to accept documented `binary.checkMD5` flag.
1 parent 88e9460 commit 09723ce

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/util/MongoBinary.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export interface MongoBinaryOpts {
1010
platform?: string;
1111
arch?: string;
1212
debug?: DebugPropT;
13+
checkMD5?: boolean;
1314
}
1415

1516
// disable error for a class with all static functions,

src/util/MongoBinaryDownload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export default class MongoBinaryDownload {
223223
response.pipe(fileStream);
224224

225225
fileStream.on('finish', () => {
226-
if (this.dlProgress.current < 1000000) {
226+
if (this.dlProgress.current < 1000000 && !httpOptions.path.endsWith('.md5')) {
227227
const downloadUrl =
228228
this._downloadingUrl || `https://${httpOptions.hostname}/${httpOptions.path}`;
229229
reject(

0 commit comments

Comments
 (0)