shama/gaze — pull request #152 by joshjensen (2014-10-06 17:26:57+00:00)
Title: Fix for ENOENT, no such file or directory error

Hey Kyle, thanks for the great module. I ran into one small issue. There is a 3rd party build script that when run against my project creates then immediately deletes a folder. The issue happens when I am watching the same folder with Gaze. That process seems to cause an error to be thrown.

`fs.js:18060: Uncaught Error: ENOENT, no such file or directory`

Then this status is shown immediately following the error:
`{filename} was deleted`

After digging around it seemed to be this was the line `var dirstat = fs.statSync(dir);` that was causing the issue. I added a check to make sure the folder exists before statSync is run.

Thanks!