filer icon indicating copy to clipboard operation
filer copied to clipboard

Support watch events for hard links

Open humphd opened this issue 6 years ago • 1 comments

In our implementation of watch events, we assume path names are enough to trigger events: a file is changed, we use the path to look at registered watchers (for that path or path prefix), and fire off events. This breaks for hard links created with fs.link().

We probably need to do more work when we register the watch. Maybe we stat the path and get the file node's id (in the case of a file). Or maybe we can borrow something from chokidar. What we do for file paths will also need to be thought through for dirs.

This is a bit of an edge case, and I'm not sure how much work to do to support it. But I'm going to land a test and skip() it, so we can return to this later.

humphd avatar Dec 02 '18 15:12 humphd

Test landed in https://github.com/filerjs/filer/pull/595

humphd avatar Dec 02 '18 15:12 humphd