Properly detect executable files
This commit is contained in:
parent
e842f2562f
commit
eee2d5b669
|
@ -428,10 +428,11 @@ static void _refresh_type(Properties * properties, struct stat * st)
|
||||||
else if(S_ISSOCK(st->st_mode))
|
else if(S_ISSOCK(st->st_mode))
|
||||||
type = "inode/socket";
|
type = "inode/socket";
|
||||||
#endif
|
#endif
|
||||||
if(type == NULL && properties->mime != NULL
|
else if(st->st_mode & S_IXUSR)
|
||||||
&& (type = mime_type(properties->mime,
|
type = "application/x-executable";
|
||||||
properties->filename)) != NULL
|
if(type == NULL && properties->mime != NULL)
|
||||||
&& (pixbuf = helper->get_icon(helper->browser,
|
type = mime_type(properties->mime, properties->filename);
|
||||||
|
if(type != NULL && (pixbuf = helper->get_icon(helper->browser,
|
||||||
type, st, 48)) != NULL)
|
type, st, 48)) != NULL)
|
||||||
image = gtk_image_new_from_pixbuf(pixbuf);
|
image = gtk_image_new_from_pixbuf(pixbuf);
|
||||||
if(type == NULL)
|
if(type == NULL)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user