From f939dd924d86c9df19dba673511f6ef66edd7b91 Mon Sep 17 00:00:00 2001 From: Justin Maggard Date: Fri, 18 Feb 2011 23:13:48 +0000 Subject: [PATCH] * Properly scan newly created directory symlinks. --- inotify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/inotify.c b/inotify.c index 0d7186a..3d089e4 100644 --- a/inotify.c +++ b/inotify.c @@ -707,7 +707,10 @@ start_inotify() { DPRINTF(E_DEBUG, L_INOTIFY, "The symbolic link %s was %s.\n", path_buf, (event->mask & IN_MOVED_TO ? "moved here" : "created")); - inotify_insert_file(esc_name, path_buf); + if( stat(path_buf, &st) == 0 && S_ISDIR(st.st_mode) ) + inotify_insert_directory(pollfds[0].fd, esc_name, path_buf); + else + inotify_insert_file(esc_name, path_buf); } else if( event->mask & (IN_CLOSE_WRITE|IN_MOVED_TO) && st.st_size > 0 ) {