[DAEMON-235] appcd-fswatcher: Recursive fs watchers do not clean up when subdirectories are deleted
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2018-03-09T22:34:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Appc Daemon 1.1.0 |
Components | appcd-fswatcher |
Labels | n/a |
Reporter | Chris Barber |
Assignee | Chris Barber |
Created | 2018-02-14T23:11:02.000+0000 |
Updated | 2018-03-09T22:34:01.000+0000 |
Description
When recursive watching a directory, it will correctly emit change events for new subdirectories and start watching them. However if the subdirectories are deleted, the fs watcher continues to watch the non-existent node.
new FSWatcher('/some/path', { depth: 1, recursive: true });
mkdir /some/path/foo
rmdir /some/path/foo
appcd status
It still continues to watch /some/path/foo
.
PR: https://github.com/appcelerator/appc-daemon/pull/289
To test, run
gulp coverage
from thepackages/appcd-fswatcher
directory on all platforms. Then on Linux and macOS, runsudo gulp coverage
.