Correct incorrect line in blocks.coffee

This commit is contained in:
Michael Smith 2012-07-02 08:27:13 -07:00
parent ace4837365
commit 2a56f0cdf7
No known key found for this signature in database
GPG Key ID: 74223E91A6ACAFA2
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ get '/hello', ->
# Append.
append = (location, data) ->
path = new Pathname location
throw new Error("Location does not exist") unless fs.exists()
throw new Error "Location does not exist" unless fs.existsSync(location)
File.open path, 'a', (file) ->
file.console.log YAML.dump data
@ -31,7 +31,7 @@ File.open = (path, mode, block) ->
# Write.
write = (location, data) ->
path = new Pathname location
raise "Location does not exist" unless fs.exists()
throw new Error "Location does not exist" unless fs.existsSync(location)
File.open path, 'w', (file) ->
return false if Digest.MD5.hexdigest(file.read()) is data.hash()