Properly detect executable files

This commit is contained in:
Pierre Pronchery 2012-11-10 00:18:25 +01:00
parent e842f2562f
commit eee2d5b669

View File

@ -428,10 +428,11 @@ static void _refresh_type(Properties * properties, struct stat * st)
else if(S_ISSOCK(st->st_mode))
type = "inode/socket";
#endif
if(type == NULL && properties->mime != NULL
&& (type = mime_type(properties->mime,
properties->filename)) != NULL
&& (pixbuf = helper->get_icon(helper->browser,
else if(st->st_mode & S_IXUSR)
type = "application/x-executable";
if(type == NULL && properties->mime != NULL)
type = mime_type(properties->mime, properties->filename);
if(type != NULL && (pixbuf = helper->get_icon(helper->browser,
type, st, 48)) != NULL)
image = gtk_image_new_from_pixbuf(pixbuf);
if(type == NULL)