From ec8a5b368bd0bd1c6ff87aa055ed4d7553172cdf Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 11 Mar 2013 19:20:36 -0700 Subject: [PATCH] Use node's crypto from fs.md5ForPath() --- src/stdlib/fs.coffee | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stdlib/fs.coffee b/src/stdlib/fs.coffee index 479b0608a..aef59bdf6 100644 --- a/src/stdlib/fs.coffee +++ b/src/stdlib/fs.coffee @@ -146,7 +146,8 @@ module.exports = traverse(rootPath, '', onFile, onDirectory) md5ForPath: (path) -> - $native.md5ForPath(path) + contents = nodeFs.readFileSync(path) + nodeRequire('crypto').createHash('md5').update(contents).digest('hex') resolve: (args...) -> extensions = args.pop() if _.isArray(_.last(args))