From 4a2302c2edf1d720c6cc48e90700d081e65e275d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 30 May 2010 23:44:39 +0200 Subject: 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. --- src/inotify_update.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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)); -- cgit v1.2.3