[Xfce-bugs] review granted: [Bug 12863] Patches: build fix, allow permission change on sshfs : [Attachment 6860] fix-permissions-editor-allow-edit-permissions
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Tue May 9 04:29:22 CEST 2017
Ivan 83 <rozhuk.im at gmail.com> has granted review:
Bug 12863: Patches: build fix, allow permission change on sshfs
https://bugzilla.xfce.org/show_bug.cgi?id=12863
Attachment 6860: fix-permissions-editor-allow-edit-permissions
https://bugzilla.xfce.org/attachment.cgi?id=6860&action=edit
--- Comment #7 from Ivan 83 <rozhuk.im at gmail.com> ---
Comment on attachment 6860
--> https://bugzilla.xfce.org/attachment.cgi?id=6860
fix-permissions-editor-allow-edit-permissions
>From ae4be81679100e7f50b9a3dbd33ebbefff2d0e15 Mon Sep 17 00:00:00 2001
>From: ivan-83 <rozhuk.im at gmail.com>
>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
>
More information about the Xfce-bugs
mailing list