Commit c889e68d authored by Mikael Magnusson's avatar Mikael Magnusson

app: fix gimp_file_is_executable check to not return true for directories

parent 99789d25
......@@ -731,9 +731,9 @@ gimp_file_is_executable (GFile *file)
GFileType file_type = g_file_info_get_file_type (info);
const gchar *filename = g_file_info_get_name (info);
if (g_file_info_get_attribute_boolean (info,
G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE) ||
((file_type == G_FILE_TYPE_REGULAR) &&
if (file_type == G_FILE_TYPE_REGULAR &&
(g_file_info_get_attribute_boolean (info,
G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE) ||
is_script (filename)))
{
executable = TRUE;
......
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