diff options
author | Colin Walters <walters@verbum.org> | 2010-02-22 09:48:45 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-02-22 09:48:45 -0500 |
commit | e1c31c73074513d96fa22b5c0355107c42720597 (patch) | |
tree | e1216637b5f52540e279f0f1f3ef9662c4437978 /bus/dir-watch-inotify.c | |
parent | 235eebdb1618ecdd0f752c9bcd92c61d17752e0b (diff) | |
parent | fbeb13517ef667b8ed4136bcb9e52ff9924419c1 (diff) | |
download | dbus-e1c31c73074513d96fa22b5c0355107c42720597.tar.gz |
Merge branch 'dbus-1.2'
Conflicts:
bus/bus.c
bus/selinux.c
configure.in
Diffstat (limited to 'bus/dir-watch-inotify.c')
-rw-r--r-- | bus/dir-watch-inotify.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bus/dir-watch-inotify.c b/bus/dir-watch-inotify.c index f457ea8e..8b70a416 100644 --- a/bus/dir-watch-inotify.c +++ b/bus/dir-watch-inotify.c @@ -155,8 +155,18 @@ _set_watched_dirs_internal (DBusList **directories) wd = inotify_add_watch (inotify_fd, new_dirs[i], IN_CLOSE_WRITE | IN_DELETE | IN_MOVED_TO | IN_MOVED_FROM); if (wd < 0) { - _dbus_warn ("Cannot setup inotify for '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno)); - goto out; + /* Not all service directories need to exist. */ + if (errno != ENOENT) + { + _dbus_warn ("Cannot setup inotify for '%s'; error '%s'\n", new_dirs[i], _dbus_strerror (errno)); + goto out; + } + else + { + new_wds[i] = -1; + new_dirs[i] = NULL; + continue; + } } new_wds[i] = wd; new_dirs[i] = _dbus_strdup (new_dirs[i]); |