Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/azatoth/minidlna.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Maggard <jmaggard@users.sourceforge.net>2011-02-19 02:13:48 +0300
committerJustin Maggard <jmaggard@users.sourceforge.net>2011-02-19 02:13:48 +0300
commit8457bbeeba77fadd9b4f227db9a58788097c3aee (patch)
tree6bdc95062f1238d15f27bd93907476179abe9fe9
parent0267ff512f77b50aa2ff8ddb0cb07480d3bb91f3 (diff)
* Properly scan newly created directory symlinks.
-rw-r--r--inotify.c5
1 files changed, 4 insertions, 1 deletions
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 )
{