Skip to content
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

add without change. #75

Closed
wtgtybhertgeghgtwtg opened this issue Dec 8, 2016 · 3 comments
Closed

add without change. #75

wtgtybhertgeghgtwtg opened this issue Dec 8, 2016 · 3 comments

Comments

@wtgtybhertgeghgtwtg
Copy link
Collaborator

Currently, creating and writing to a file in a watched directory with a method like fs.writeFileSync causes both an add and a change event to be fired. Is there a way to config sane to only trigger the add event in cases like this? I have a repository demonstrating the issue.

@amasad
Copy link
Owner

amasad commented Dec 8, 2016

The change is on the directory, right? You can filter the event yourself for all directory changes

@wtgtybhertgeghgtwtg
Copy link
Collaborator Author

A file is being added to the directory, which triggers an add event, but it is also triggering a change event a moment later. I am not sure how filtering would help here.

@amasad
Copy link
Owner

amasad commented Feb 13, 2017

I forgot about this but we do filter out all change events on directories. I tried your repro but it didn't work for me: OS/X Node v7.2.0

@amasad amasad reopened this Feb 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants