summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-directory-async.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-11-23 23:39:10 +0100
committerVictor Kareh <[email protected]>2020-12-11 13:18:31 -0500
commit7f9200cbdd5678a39262321538813f1963b807cb (patch)
treeec7da321d1a3fc923ecca46bda717ef42a8b1606 /libcaja-private/caja-directory-async.c
parent4a7fe0f438ab37bcb483ac63627b86872da6c1b8 (diff)
downloadcaja-7f9200cbdd5678a39262321538813f1963b807cb.tar.bz2
caja-7f9200cbdd5678a39262321538813f1963b807cb.tar.xz
caja-directory-async: trust also launchers from user desktop
Diffstat (limited to 'libcaja-private/caja-directory-async.c')
-rw-r--r--libcaja-private/caja-directory-async.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c
index b50c168e..874667d3 100644
--- a/libcaja-private/caja-directory-async.c
+++ b/libcaja-private/caja-directory-async.c
@@ -3854,25 +3854,22 @@ static gboolean
is_link_trusted (CajaFile *file,
gboolean is_launcher)
{
- gboolean res;
+ gboolean res = FALSE;
if (!is_launcher)
{
return TRUE;
}
- res = FALSE;
-
if (caja_file_can_execute (file) && caja_file_is_local (file))
{
GFile *location;
location = caja_file_get_location (file);
- res = caja_is_in_system_dir (location);
- if (!res) {
- res = is_trusted_system_desktop_file (location);
- }
+ res = caja_is_in_system_dir (location) ||
+ is_trusted_system_desktop_file (location) ||
+ caja_is_in_desktop_dir (location);
g_object_unref (location);
}