[gnome-commander] When checking for a file being executable, first check if it is local, then if it is a file or not



commit b4bf59b92cd3f46795f09c52700527bab6cc001a
Author: Uwe Scholz <u scholz83 gmx de>
Date:   Sun Dec 5 22:42:10 2021 +0100

    When checking for a file being executable, first check if it is local, then if it is a file or not

 src/gnome-cmd-file.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-file.cc b/src/gnome-cmd-file.cc
index ec1b45c8..12644244 100644
--- a/src/gnome-cmd-file.cc
+++ b/src/gnome-cmd-file.cc
@@ -1036,10 +1036,10 @@ gboolean GnomeCmdFile::is_local()
 
 gboolean GnomeCmdFile::is_executable()
 {
-    if (GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) != G_FILE_TYPE_REGULAR)
+    if (!is_local())
         return FALSE;
 
-    if (!is_local())
+    if (GetGfileAttributeUInt32(G_FILE_ATTRIBUTE_STANDARD_TYPE) != G_FILE_TYPE_REGULAR)
         return FALSE;
 
     if (GetGfileAttributeBoolean(G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]