From ae4be81679100e7f50b9a3dbd33ebbefff2d0e15 Mon Sep 17 00:00:00 2001 From: ivan-83 Date: Thu, 8 Sep 2016 05:51:30 +0300 Subject: [PATCH 09/10] fix permissions editor: allow edit permissions for all writible files original code allways return false on sshfs mounts --- thunar/thunar-file.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index c8ca881..e7b8b99 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -3196,17 +3196,11 @@ thunar_file_is_chmodable (const ThunarFile *file) * b) the super-user id * and the file is not in the trash. */ - if (file->info == NULL) - { - return (effective_user_id == 0 && !thunar_file_is_trashed (file)); - } - else - { - return ((effective_user_id == 0 - || effective_user_id == g_file_info_get_attribute_uint32 (file->info, - G_FILE_ATTRIBUTE_UNIX_UID)) - && !thunar_file_is_trashed (file)); - } + if (thunar_file_is_trashed (file)) + return (FALSE); + if (effective_user_id == 0) + return (TRUE); + return (thunar_file_is_writable (file)); } -- 2.9.2