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:
		@@ -179,8 +179,7 @@ recursive_watch_subdirectories(struct watch_directory *directory,
 | 
				
			|||||||
			continue;
 | 
								continue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		child_path_fs = g_strconcat(path_fs, "/", ent->d_name, NULL);
 | 
							child_path_fs = g_strconcat(path_fs, "/", ent->d_name, NULL);
 | 
				
			||||||
		/* XXX what about symlinks? */
 | 
							ret = stat(child_path_fs, &st);
 | 
				
			||||||
		ret = lstat(child_path_fs, &st);
 | 
					 | 
				
			||||||
		if (ret < 0) {
 | 
							if (ret < 0) {
 | 
				
			||||||
			g_warning("Failed to stat %s: %s",
 | 
								g_warning("Failed to stat %s: %s",
 | 
				
			||||||
				  child_path_fs, g_strerror(errno));
 | 
									  child_path_fs, g_strerror(errno));
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user