[gimp] app: fix gimp_file_is_executable check to not return true for directories
- From: Mikael Magnusson <mikachu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: fix gimp_file_is_executable check to not return true for directories
- Date: Wed, 29 Oct 2014 20:43:37 +0000 (UTC)
commit c889e68d8d84079709c1b7fc1134128d560b7de8
Author: Mikael Magnusson <mikachu src gnome org>
Date: Mon Sep 29 16:55:40 2014 +0200
app: fix gimp_file_is_executable check to not return true for directories
app/core/gimp-utils.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/app/core/gimp-utils.c b/app/core/gimp-utils.c
index 5636fb2..e7032e4 100644
--- a/app/core/gimp-utils.c
+++ b/app/core/gimp-utils.c
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]