gnome-vfs (1:2.24.3-1) 13_resolve_fstab_symlinks.patch

Summary

 libgnomevfs/gnome-vfs-unix-mounts.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

Index: gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-unix-mounts.c
===================================================================
--- gnome-vfs-2.24.2.orig/libgnomevfs/gnome-vfs-unix-mounts.c	2009-04-20 12:46:46.000000000 +0200
+++ gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-unix-mounts.c	2010-02-06 11:55:48.381279121 +0100
@@ -541,6 +541,7 @@
 	char *opt, *opt_end;
 	struct stat sb;
 	GnomeVFSUnixMountPoint *mount_entry;
+        char rpath[PATH_MAX];
 	
 	stat_file = read_file = get_fstab_file ();
 
@@ -572,7 +573,12 @@
 		
 		mount_entry = g_new0 (GnomeVFSUnixMountPoint, 1);
 
-		mount_entry->mount_path = g_strdup (mntent->mnt_dir);
+                /* resolve symlinks */
+                if (realpath (mntent->mnt_dir, rpath))
+                    mount_entry->mount_path = g_strdup (rpath);
+                else
+                    mount_entry->mount_path = g_strdup (mntent->mnt_dir);
+
 		mount_entry->device_path = g_strdup (mntent->mnt_fsname);
 		mount_entry->filesystem_type = g_strdup (mntent->mnt_type);