Currently the implementation of FSNotify on Linux traverses through all subdirectories and call INo.addWatch (inotify_add_watch) recursively on all directories. This crashes applications when a really unwanted directory (for example, one containing broken symlinks) is scanned, and may cause performance problems.
Currently the implementation of FSNotify on Linux traverses through all subdirectories and call
INo.addWatch
(inotify_add_watch
) recursively on all directories. This crashes applications when a really unwanted directory (for example, one containing broken symlinks) is scanned, and may cause performance problems.(See https://github.com/srid/unionmount/issues/9 , where
.direnv
and therefore a wholenixpkgs
is scanned.)In this patch, a
confPathFilter
is added toWatchConfig
to allow users to hold the library back from traversing down unwanted directories.