"unlink" not fired, when watching single file (Mac) #9

Closed
vojtajina opened this Issue Jul 22, 2012 · 9 comments

5 participants

@vojtajina
$ touch some.file
chokidar.watch('some.file', {persistent: true})
    .on('unlink', function() {console.log('unlink', arguments)});
$ rm some.file

Won't fire the unlink event.

Watching directory works fine.

@paulmillr
Owner

yep reproduced, fix is coming

@paulmillr
Owner

this is actually more complicated than I thought

@lancejpollard

Any updates on this, I'm having this issue as well. Mac OSX 10.6.7. Node v0.8.2.

Great module by the way. File watching is such a powerful thing, your project is the best solution so far. Thanks!

@paulmillr
Owner

thanks for thanks; nope no updates, didn’t had an use case yet

@paulmillr
Owner

I think I will try to work on this today-tomorrow.

@lancejpollard

When I delete a file (Mac, right click, remove file, which is what I normally do), it says ".DS_Store changed", so that's a start.

@shama shama referenced this issue in gruntjs/grunt Sep 4, 2012
Closed

Modify watch task to use chokidar #399

@Fauntleroy

Still having this issue in OSX. Is this one impossible to solve?

@paulmillr
Owner

possible, just requires not super simple changes. feel free to submit PR.

@es128
Collaborator

This appears to be fixed in current master branch when using fsevents or polling.

One catch is that in polling mode it exits after the file was deleted if that was the only thing being watched. But I'm still doing more work on making the behaviors more consistent.

@es128 es128 added a commit that referenced this issue Oct 19, 2014
@es128 es128 Make it possible to watch non-existent files
gh-105
gh-9

More testing needed
9845cdd
@es128 es128 added a commit that referenced this issue Oct 21, 2014
@es128 es128 Add test for unlink of watched file a841236
@es128 es128 closed this in #163 Oct 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment