udev_monitor.c: fail if monitored file is not dir
This commit is contained in:
parent
4a6b31b8f1
commit
f4b2b9331e
1 changed files with 1 additions and 1 deletions
|
|
@ -258,7 +258,7 @@ struct udev_monitor *udev_monitor_new_from_netlink(struct udev *udev, const char
|
|||
goto close_signal_fd;
|
||||
}
|
||||
|
||||
if (inotify_add_watch(udev_monitor->ifd, UDEV_MONITOR_DIR, IN_CLOSE_WRITE | IN_EXCL_UNLINK) == -1) {
|
||||
if (inotify_add_watch(udev_monitor->ifd, UDEV_MONITOR_DIR, IN_CLOSE_WRITE | IN_EXCL_UNLINK | IN_ONLYDIR) == -1) {
|
||||
goto close_ifd;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue