Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Watch callback is called twice for a single file modification #50

Open
benogle opened this issue Nov 24, 2014 · 3 comments
Open

Watch callback is called twice for a single file modification #50

benogle opened this issue Nov 24, 2014 · 3 comments
Assignees
Labels

Comments

@benogle
Copy link
Contributor

benogle commented Nov 24, 2014

Put a break point here: https://github.com/atom/atom/blob/e04c05ffeec53ef5e025f50bd9e32b42c13d9f15/src/config.coffee#L730, and save the config file. It is called twice by pathwatcher. As far as I can tell, it is only creating one watch.

@benogle benogle added the bug label Nov 24, 2014
@nathansobo
Copy link
Contributor

@benogle Yeah it seems to be getting invoked twice when I edit config.cson in Atom. I'm going to update the issue title to clarify.

@nathansobo nathansobo changed the title Watches called twice Watch callback is called twice for a single file modification Nov 24, 2014
@philipgiuliani
Copy link

#17

@kevinsawicki already fixed this some longer time ago, but he hasnt merged it than because of the risk that it will break some events.

@benogle
Copy link
Contributor Author

benogle commented Nov 25, 2014

Ah, thanks @philipgiuliani.

Galadirith added a commit to atom-community/markdown-preview-plus that referenced this issue Aug 9, 2015
The rerendering of the preview was also decoupled from the pathwatcher
listener. Now all pathwatcher events are captured and processed
including all those triggered by the same file modification as described
in atom/node-pathwatcher#50.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants