gnome-vfs-2.24.xx-utf8-mounts.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132
  1. gnome-vfs-daemon reads /proc/mounts at startup and uses HAL via
  2. libhal_drive_from_device_file() in multiple places in gnome-vfs-hal-mounts.c
  3. Strings in DBUS must be valid UTF8. If the device path is not valid UTF8,
  4. dbus_connection_send() will cause a disconnect of the caller and an exit.
  5. Threfore if the device path contains invalid utf8, gnome-vfs-daemon will fail
  6. to start. If that happens during a session, gnome-vfs-daemon will be restarted
  7. by any gnome application wich cause a lot of start/stop of gnome-vfs-daemon.
  8. The following patch simply ensures that we use valid utf8 for device path to
  9. avoid problems with hal/dbus.
  10. Olivier Fourdan <ofourdan@redhat.com>
  11. gnome-vfs-volume-monitor-daemon.c | 2 +-
  12. 1 file changed, 1 insertion(+), 1 deletion(-)
  13. diff -up gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c.utf8-mount gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c
  14. --- gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c.utf8-mount 2009-07-07 06:10:24.000000000 -0400
  15. +++ gnome-vfs-2.16.2/libgnomevfs/gnome-vfs-volume-monitor-daemon.c 2009-07-07 06:10:34.000000000 -0400
  16. @@ -874,7 +874,7 @@ create_vol_from_mount (GnomeVFSVolumeMon
  17. vol = g_object_new (GNOME_VFS_TYPE_VOLUME, NULL);
  18. vol->priv->volume_type = GNOME_VFS_VOLUME_TYPE_MOUNTPOINT;
  19. - vol->priv->device_path = g_strdup (mount->device_path);
  20. + vol->priv->device_path = make_utf8 (mount->device_path);
  21. vol->priv->unix_device = 0; /* Caller must fill in. */
  22. vol->priv->activation_uri = gnome_vfs_get_uri_from_local_path (mount->mount_path);
  23. vol->priv->filesystem_type = g_strdup (mount->filesystem_type);