gaze icon indicating copy to clipboard operation
gaze copied to clipboard

Fixes race condition with watchDir

Open alexgorbatchev opened this issue 9 years ago • 3 comments

I have a script that is actively deleting some of the directories being watched, this was causing gaze to fall over with ENOENT exception.

This PR addresses this issue.

alexgorbatchev avatar Mar 21 '17 20:03 alexgorbatchev

@shama any thoughts on this?

alexgorbatchev avatar Mar 25 '17 00:03 alexgorbatchev

I don't think this fixes an issue. Calling watch on a non-existent file should cause it to throw and there is a try catch there. So the ENOENT is probably caused by something else.

shama avatar Mar 25 '17 17:03 shama

This was the fix that prevented gaze from crashing in my scenario. Basically, files were being built and placed in the watched folder. Before the build, whole build folder would be removed.

alexgorbatchev avatar Apr 21 '17 16:04 alexgorbatchev