[Nautilus-list] Loading symlinked svg icons fails



Dear Nautilus developers,

It seems that the CVS HEAD version of Nautilus can't load
those svg icon files which are actually symlinks pointing
to the real svg file. I noticed this while using GNU stow
to manage Nautilus installation.

The bug exists, because the code doing the identifying of
icon files doesn't follow symlinks.

(Function is path_represents_svg_image in file
 libnautilus-extensions/nautilus-icon-factory.c)

A patch to provide an easy fix for this bug is attached
below.

	Pauli Virtanen

PS. I am not subscribed to this mailing list, so please CC
    replies to me if necessary.



diff -ru nautilus-old/libnautilus-extensions/nautilus-icon-factory.c
nautilus/libnautilus-extensions/nautilus-icon-factory.c
--- nautilus-old/libnautilus-extensions/nautilus-icon-factory.c	Tue Dec
12 23:35:36 2000
+++ nautilus/libnautilus-extensions/nautilus-icon-factory.c	Wed Dec 13
00:05:59 2000
@@ -1590,7 +1590,7 @@
 
 	uri = gnome_vfs_get_uri_from_local_path (path);
 	gnome_vfs_file_info_init (&file_info);
-	gnome_vfs_get_file_info (uri, &file_info,
GNOME_VFS_FILE_INFO_GET_MIME_TYPE);
+	gnome_vfs_get_file_info (uri, &file_info,
GNOME_VFS_FILE_INFO_GET_MIME_TYPE | GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
 	g_free (uri);
 	is_svg = nautilus_strcmp (file_info.mime_type, "image/svg") == 0;
 	gnome_vfs_file_info_clear (&file_info);






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]