diff options
author | Justin Maggard <jmaggard@users.sourceforge.net> | 2011-02-19 02:13:48 +0300 |
---|---|---|
committer | Justin Maggard <jmaggard@users.sourceforge.net> | 2011-02-19 02:13:48 +0300 |
commit | 8457bbeeba77fadd9b4f227db9a58788097c3aee (patch) | |
tree | 6bdc95062f1238d15f27bd93907476179abe9fe9 | |
parent | 0267ff512f77b50aa2ff8ddb0cb07480d3bb91f3 (diff) |
* Properly scan newly created directory symlinks.
-rw-r--r-- | inotify.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 ) { |