Skip to content
Browse files

Added comment to explain why you get "Failed to restore data: #{self.…

…filename}" notice after running `node server.js` locally for the first time.

The message previously made me think I had something wrong with my file/directory permissions on `/tmp`. Permissions were fine - and I eventually realised the true cause of the "failure" was an empty file - which obviously can not be restored from.

The note I've added should help to ease the minds of others running the server for the first time... but ideally a better solution should be looked into (i.e. don't report the failure if the file was read successfully, but was just empty).
  • Loading branch information...
1 parent fd5cd05 commit 01372e93c1edb2eacf0e6563eb295a4886b9aeec @chrisjacob chrisjacob committed Apr 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/plunker/stores/
2 lib/plunker/stores/
@@ -68,7 +68,7 @@ class Store
console.log "Attempting to restore data from: #{@filename}"
fs.readFile @filename, "utf8", (err, data) ->
- if err then console.log "Failed to restore data: #{self.filename}"
+ if err then console.log "Failed to restore data: #{self.filename} *Note: On your first run of `node server.js` this is expected (you have not stored any data yet)."
plunks = JSON.parse(data)

0 comments on commit 01372e9

Please sign in to comment.
Something went wrong with that request. Please try again.