-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Description
Description
When creating recursively directories with mkdir -p, the watcher only reports the first directory.
Steps to Reproduce
- Install the CLI from Add a CLI #59
- Run
nsfw /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: /tmp/foo
Created: /tmp/foo/bar
Created: /tmp/foo/bar/baz
Actual behavior:
The watcher only says that the directory foo has been created:
Created: /tmp/foo
Additional Information
As far as I know, inotify is not recursive, and it's nsfw 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.
Metadata
Metadata
Assignees
Labels
No labels