Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
When creating recursively directories with mkdir -p, the watcher only reports the first directory.
Steps to Reproduce
Install the CLI from #180
Run watcher /tmp
Execute mkdir -p /tmp/foo/bar/baz
Expected behavior:
The watcher says that directories foo, foo/bar and foo/bar/baz have been created:
created directory: /tmp/foo
created directory: /tmp/foo/bar
created directory: /tmp/foo/bar/baz
Actual behavior:
The watcher only says that the directory foo has been created:
created directory: /tmp/foo
Reproduces how often:
Always.
Versions
I've used the master branch of @atom/watcher.
Additional Information
As far as I know, inotify is not recursive, and it's @atom/watcher code that creates sub-watchers for directories inside the watched directory. When inotify sends the event for foo, the directories foo/bar and foo/bar/baz have already been created, so even if the watcher is able to find these directories to tell inotify to watch them, it fails to also send an event for them.
Prerequisites
Description
When creating recursively directories with
mkdir -p
, the watcher only reports the first directory.Steps to Reproduce
watcher /tmp
mkdir -p /tmp/foo/bar/baz
Expected behavior:
The watcher says that directories
foo
,foo/bar
andfoo/bar/baz
have been created:Actual behavior:
The watcher only says that the directory
foo
has been created:Reproduces how often:
Always.
Versions
I've used the master branch of
@atom/watcher
.Additional Information
As far as I know, inotify is not recursive, and it's
@atom/watcher
code that creates sub-watchers for directories inside the watched directory. When inotify sends the event forfoo
, the directoriesfoo/bar
andfoo/bar/baz
have already been created, so even if the watcher is able to find these directories to tell inotify to watch them, it fails to also send an event for them.