--- Thunar-0.9.0/thunar-vfs/thunar-vfs-io-local.c	2007-12-02 14:46:33.000000000 +0100
+++ Thunar-0.9.0-patch/thunar-vfs/thunar-vfs-io-local.c	2008-04-24 11:52:10.000000000 +0200
@@ -459,9 +459,13 @@
                   /* drop any suffix (e.g. '.png') from themed icons */
                   if (!g_path_is_absolute (info->custom_icon))
                     {
-                      p = strrchr (info->custom_icon, '.');
-                      if (G_UNLIKELY (p != NULL))
-                        *p = '\0';
+                      if (g_str_has_suffix (info->custom_icon, ".png") || g_str_has_suffix (info->custom_icon, ".svg")
+                          || g_str_has_suffix (info->custom_icon, ".xpm"))
+                        {
+                          p = strrchr (info->custom_icon, '.');
+                          if (G_UNLIKELY (p != NULL))
+                              *p = '\0';
+                        }
                     }
                 }
 
