File 0001-Fix-metadata-trusted-attribute-handling.patch of Package gnome-shell-extension-desktop-icons-ng

From a4959ca7d78b6cc65269e87b247557bf7b99f928 Mon Sep 17 00:00:00 2001
From: Eugene Zamriy <ezamriy@msvsphere-os.ru>
Date: Wed, 16 Apr 2025 23:36:41 +0300
Subject: [PATCH] Fix metadata::trusted attribute handling

When Arc Menu creates a desktop shortcut it sets the
metadata::trusted attribute value to "yes", but Desktop Icons NG
expects it to be "true". This patch adds support for both value
variants so that a user doesn't need to mark a desktop icon as
executable manually.
---
 app/fileItem.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/fileItem.js b/app/fileItem.js
index 13435ec..9478743 100644
--- a/app/fileItem.js
+++ b/app/fileItem.js
@@ -239,7 +239,8 @@ var FileItem = class extends desktopIconItem.desktopIconItem {
         this._attributeCanExecute = fileInfo.get_attribute_boolean('access::can-execute');
         this._unixmode = fileInfo.get_attribute_uint32('unix::mode');
         this._writableByOthers = (this._unixmode & Enums.S_IWOTH) != 0;
-        this._trusted = fileInfo.get_attribute_as_string('metadata::trusted') == 'true';
+        let fiTrusted = fileInfo.get_attribute_as_string('metadata::trusted');
+        this._trusted = (fiTrusted == 'true' || fiTrusted == 'yes');
         this._attributeContentType = fileInfo.get_content_type();
         this._isDesktopFile = this._attributeContentType == 'application/x-desktop';
 
-- 
2.43.5

openSUSE Build Service is sponsored by