diff --git a/ChangeLog b/ChangeLog
index d3eb489ae3e6c1574aca63c59bed278e3c78977f..d29c46bb8e5d63cce756998a767ddb5fd5b1ae93 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-14	Benedikt Meurer <benny@xfce.org>
+
+	* thunar-vfs/thunar-vfs-io-local.c(_thunar_vfs_io_local_get_info):
+	  Properly validate the Name of .desktop files. Bug #2227.
+
 2006-09-14	Benedikt Meurer <benny@xfce.org>
 
 	* thunarx/thunarx-config.h.in, thunarx/thunarx-file-info.h: Fix build
diff --git a/thunar-vfs/thunar-vfs-io-local.c b/thunar-vfs/thunar-vfs-io-local.c
index ecdd86554c8d18c8c9c1a7be2d4581e71e812779..7249754228de139c69fbcd2beab8712f5cc138f2 100644
--- a/thunar-vfs/thunar-vfs-io-local.c
+++ b/thunar-vfs/thunar-vfs-io-local.c
@@ -382,7 +382,7 @@ _thunar_vfs_io_local_get_info (ThunarVfsPath *path,
 
               /* check if we have a valid name info */
               name = xfce_rc_read_entry (rc, "Name", NULL);
-              if (G_LIKELY (name != NULL && *name != '\0' && g_utf8_validate (name, -1, NULL)))
+              if (G_LIKELY (name != NULL && *name != '\0' && g_utf8_validate (name, -1, NULL) && strchr (name, G_DIR_SEPARATOR) == NULL))
                 {
                   /* check if we declared the file as executable */
                   if ((info->flags & THUNAR_VFS_FILE_FLAGS_EXECUTABLE) != 0)