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.
This commit is contained in:
Max Kellermann 2010-05-30 23:44:39 +02:00
parent 980201a665
commit 4a2302c2ed

View File

@ -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));