Skip to content

Commit

Permalink
use binary encoding to read files
Browse files Browse the repository at this point in the history
  • Loading branch information
pandamicro committed Dec 12, 2017
1 parent e775fea commit 6863569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion version_generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function readDir (dir, obj) {
else if (stat.isFile()) {
// Size in Bytes
size = stat['size'];
md5 = crypto.createHash('md5').update(fs.readFileSync(subpath)).digest('hex');
md5 = crypto.createHash('md5').update(fs.readFileSync(subpath, 'binary')).digest('hex');
compressed = path.extname(subpath).toLowerCase() === '.zip';

relative = path.relative(src, subpath);
Expand Down

0 comments on commit 6863569

Please sign in to comment.