Revert "Remove $native.md5ForPath()"

This reverts commit 832df7149e.
This commit is contained in:
Kevin Sawicki
2013-03-12 08:23:54 -07:00
parent a5a41cf292
commit 6f5138a56e
2 changed files with 19 additions and 4 deletions

View File

@@ -1,5 +1,4 @@
fs = nodeRequire 'fs'
crypto = nodeRequire 'crypto'
paths = [
"#{window.resourcePath}/spec"
@@ -87,8 +86,7 @@ createCacheDirectory = ->
fs.mkdirSync('/tmp/atom-compiled-scripts') unless __exists('/tmp/atom-compiled-scripts')
getCacheFilePath = (path) ->
md5 = crypto.createHash('md5').update(fs.readFileSync(path)).digest('hex')
"/tmp/atom-compiled-scripts/#{md5}"
"/tmp/atom-compiled-scripts/#{$native.md5ForPath(path)}"
resolve = (name, {verifyExistence}={}) ->
verifyExistence ?= true