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

addWatch callback overrides callback passed in previous addWatch call #2

Closed
codehero opened this issue Aug 6, 2010 · 1 comment
Closed

Comments

@codehero
Copy link

codehero commented Aug 6, 2010

In the following snippet:

this.queueWatch = this.inotify.addWatch({
    "path" : this.config.queueDir,
    "watch_for" : Inotify.IN_ALL_EVENTS,
    "callback" : function(event){
        sys.puts("INOTIFY1");
    }
});

this.outgoingWatch = this.inotify.addWatch({
    "path":this.config.outgoingDir,
    "watch_for" : Inotify.IN_ALL_EVENTS,
    "callback" : function(event){
        sys.puts("INOTIFY2");
    }
});

queue and outgoing are separate directories. However, adding a file to queue results in INOTIFY2 displaying, not INOTIFY1 as I would expect. Furthermore, if I create a second Inotify() instance (this.inotify2) and add the second watch to that, I get the correct behaviour for "queue". Unfortunately, "outgoing" fails to respond to changes in that directory in either case.

@c4milo
Copy link
Owner

c4milo commented Aug 7, 2010

This issue was closed.
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