Skip to content

Commit

Permalink
Merge pull request #1 from bitofsky/dev
Browse files Browse the repository at this point in the history
fix: MD5 creation changed from Zip's MD5 to File Contents MD5
  • Loading branch information
bitofsky authored Sep 21, 2020
2 parents f3ead58 + 198f8e7 commit 3400c07
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import { SERV_DIR, SERV_PATH, SERV_ADDR, SERV_PORT, SERV_MD5_PATH, SERV_INFO_PAT
if (!SERV_DIR) throw new Error('env.SERV_DIR undefined');

const { buffer, entries } = compressDirectory(SERV_DIR);
const md5 = toMD5(buffer);

const filesMD5s: string[] = entries.map(o => toMD5(o.getCompressedData()));
const md5 = toMD5(Buffer.from(filesMD5s.join(''), 'utf8'));

(async () => {

Expand Down

0 comments on commit 3400c07

Please sign in to comment.