Commit e02e616e authored by Frederic Crozat's avatar Frederic Crozat Committed by Frédéric Crozat

Only strip icon name when it ends with a know icon extension.

2008-03-19  Frederic Crozat  <fcrozat@mandriva.com>

        * libnautilus-private/nautilus-link.c:
        Only strip icon name when it ends with a know
        icon extension.


svn path=/trunk/; revision=13957
parent 1dd1729a
2008-03-19 Frederic Crozat <fcrozat@mandriva.com>
* libnautilus-private/nautilus-link.c:
Only strip icon name when it ends with a know
icon extension.
2008-03-19 Alexander Larsson <alexl@redhat.com>
* MAINTAINERS:
......
......@@ -345,7 +345,14 @@ nautilus_link_get_link_icon_from_desktop (GnomeDesktopItem *desktop_file)
if (!g_path_is_absolute (icon_copy)) {
/* Strip out any extension on non-filename icons. Old desktop files may have this */
p = strchr (icon_copy, '.');
if (p != NULL) {
/* Only strip known icon extensions */
if ((p != NULL) &&
((g_ascii_strcasecmp (p, ".png") == 0)
|| (g_ascii_strcasecmp (p, ".svn") == 0)
|| (g_ascii_strcasecmp (p, ".jpg") == 0)
|| (g_ascii_strcasecmp (p, ".xpm") == 0)
|| (g_ascii_strcasecmp (p, ".bmp") == 0)
|| (g_ascii_strcasecmp (p, ".jpeg") == 0))) {
*p = 0;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment