-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added event never fires #41
Comments
I just tried this to see if there's any problem with require('fs').watch('app', {persistent: true}, function(event, filename) {
console.log('EVENT', event);
console.log('FILENAME', filename);
}); I saved the above as
I think this is the expected output (?), so it seems that |
OK I just solved my own problem, but I'm not sure why this made a difference, so you might want to treat this as a bug... When I changed the watch pattern from an absolute path to a relative one, it worked. i.e. I changed Once I made that change, the |
I'm also experiencing this problem. I have a global config that files throughout my project reference for various config variables including paths which are all absolute and are being passed to gaze. When I add new files to folders being watched, the I'm on the latest version of gaze (0.4.0) |
Fixed with 23cba6f |
I am currently still experiencing this issue using node 0.10.21. The 'added' event doesn't fire |
Could you please provide more context? Your gruntfile and the exact steps I can take to reproduce the issue. |
Ya sorry about that: gaze('**', function (err, watcher) {
// doing stuff here
this.on('all', function (evt, filePath) {
// react to file change
});
}); I tried it with both |
You mean that it doesn't detect any file adds at all? |
Exactly |
Ah ok I was confusing this issue with #14. |
I am using the latest version as of writing (0.6.4, node 0.10.31, OS X 10.10) and this is still an issue, i.e. using a relative path as the pattern works but specifying an absolute path does not. |
I've got Gaze set up as per the first example under Usage in the readme (except I'm using a more general watch pattern,
/some/path/**/*.*
).When I create a new file, the
added
event doesn't fire (and neither does theall
event).The
changed
anddeleted
events work fine.This is not the same as issue #14, as I don't get any
added
events, even for files created in pre-existing directories. When I rename a file that is being watched, I get thedeleted
event for the old filename, but noadded
event for the new one. Also, subsequent changes to the file don't triggerchanged
events. Basically Gaze never seems to pick up new files, but it works fine for all files that existed when I first calledgaze(...)
.I'm using Node v0.10.8 on OS X Mountain Lion.
Any idea what the problem could be?
The text was updated successfully, but these errors were encountered: