aboutsummaryrefslogtreecommitdiffstats
path: root/src/inotify_update.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-30 23:44:39 +0200
committerMax Kellermann <max@duempel.org>2010-05-30 23:45:47 +0200
commit4a2302c2edf1d720c6cc48e90700d081e65e275d (patch)
tree6a617af82a72a730af599fcb22a4a86ae9e5a771 /src/inotify_update.c
parent980201a6655fc9d3f7b22eb00ed5a96c360b707b (diff)
downloadmpd-4a2302c2edf1d720c6cc48e90700d081e65e275d.tar.gz
mpd-4a2302c2edf1d720c6cc48e90700d081e65e275d.tar.xz
mpd-4a2302c2edf1d720c6cc48e90700d081e65e275d.zip
inotify_update: follow symlinks
This is probably unsafe, and doesn't protect against symlink loops, but we will eventually add this when we bring update*.c and inotify*.c closer together.
Diffstat (limited to '')
-rw-r--r--src/inotify_update.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/inotify_update.c b/src/inotify_update.c
index 4939aa557..8d9657961 100644
--- a/src/inotify_update.c
+++ b/src/inotify_update.c
@@ -179,8 +179,7 @@ recursive_watch_subdirectories(struct watch_directory *directory,
continue;
child_path_fs = g_strconcat(path_fs, "/", ent->d_name, NULL);
- /* XXX what about symlinks? */
- ret = lstat(child_path_fs, &st);
+ ret = stat(child_path_fs, &st);
if (ret < 0) {
g_warning("Failed to stat %s: %s",
child_path_fs, g_strerror(errno));