[gnome-commander] is_executable: use GIO instead of GnomeVFSFileInfo
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] is_executable: use GIO instead of GnomeVFSFileInfo
- Date: Fri, 4 Jun 2021 22:23:38 +0000 (UTC)
commit 52129a713dbaf92c0e68e48ed008569eb0a0d7d3
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sat Jun 5 00:23:21 2021 +0200
is_executable: use GIO instead of GnomeVFSFileInfo
src/gnome-cmd-file.cc | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index 334389f9a..506ec3010 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -1121,13 +1121,15 @@ gboolean GnomeCmdFile::is_executable()
if (!is_local())
return FALSE;
- if (gcmd_owner.uid() == info->uid && info->permissions & GNOME_CMD_PERM_USER_EXEC)
+ if (gcmd_owner.uid() == GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_UNIX_UID)
+ && GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_UNIX_MODE) &
GNOME_CMD_PERM_USER_EXEC)
return TRUE;
- if (gcmd_owner.gid() == info->gid && info->permissions & GNOME_CMD_PERM_GROUP_EXEC)
+ if (gcmd_owner.gid() == GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_UNIX_GID)
+ && GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_UNIX_MODE) &
GNOME_CMD_PERM_GROUP_EXEC)
return TRUE;
- if (info->permissions & GNOME_CMD_PERM_OTHER_EXEC)
+ if (GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_UNIX_MODE) & GNOME_CMD_PERM_OTHER_EXEC)
return TRUE;
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]