! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Patches: build fix, allow permission change on sshfs
Status:
RESOLVED: FIXED

Comments

Description Ivan 83 2016-09-20 08:26:34 CEST
Created attachment 6858 
1

* build-fix (_thunar_return_val_if_fail)
* remove unneeded include
* build-fix-without-HAVE_GIO_UNIX
* fix permissions editor: allow edit permissions for all
Comment 1 Ivan 83 2016-09-20 08:27:15 CEST
Created attachment 6859 
remove-unneded-include
Comment 2 Ivan 83 2016-09-20 08:31:56 CEST
Created attachment 6860 
fix-permissions-editor-allow-edit-permissions
Comment 3 Ivan 83 2016-09-20 08:35:19 CEST
Created attachment 6861 
build-fix-without-HAVE_GIO_UNIX
Comment 4 Ivan 83 2016-09-20 08:49:12 CEST
But I cant find how to force dir reload/update after permissions changed, so manual refresh required after permissions update to see new permissions.
Comment 5 Ivan 83 2017-05-09 04:27:22 CEST
Comment on attachment 6858 
1

>From 0d6bab1ebd7e83f2c3aff94732d876073bc13e7d Mon Sep 17 00:00:00 2001
>From: ivan-83 <rozhuk.im@gmail.com>
>Date: Sun, 4 Sep 2016 10:04:12 +0300
>Subject: [PATCH 05/10] * build fix
>
>---
> thunar/thunar-file.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
>index 3262dfb..c8ca881 100644
>--- a/thunar/thunar-file.c
>+++ b/thunar/thunar-file.c
>@@ -3920,7 +3920,7 @@ thunar_file_unwatch (ThunarFile *file)
> gboolean
> thunar_file_reload (ThunarFile *file)
> {
>-  _thunar_return_if_fail (THUNAR_IS_FILE (file));
>+  _thunar_return_val_if_fail (THUNAR_IS_FILE (file), FALSE);
> 
>   /* clear file pxmap cache */
>   thunar_icon_factory_clear_pixmap_cache (file);
>-- 
>2.9.2
>
Comment 6 Ivan 83 2017-05-09 04:28:10 CEST
Comment on attachment 6859 
remove-unneded-include

>From d3ffc57fa19552fc33dfe1342d1eda1a963e08d5 Mon Sep 17 00:00:00 2001
>From: ivan-83 <rozhuk.im@gmail.com>
>Date: Sun, 4 Sep 2016 20:05:53 +0300
>Subject: [PATCH 06/10] remove unneded include
>
>---
> thunar/thunar-device-monitor.c | 3 ---
> 1 file changed, 3 deletions(-)
>
>diff --git a/thunar/thunar-device-monitor.c b/thunar/thunar-device-monitor.c
>index 0e4da60..aa253f0 100644
>--- a/thunar/thunar-device-monitor.c
>+++ b/thunar/thunar-device-monitor.c
>@@ -23,9 +23,6 @@
> #endif
> 
> #include <gio/gio.h>
>-#ifdef HAVE_GIO_UNIX
>-#include <gio/gunixmounts.h>
>-#endif
> 
> #include <thunar/thunar-device-monitor.h>
> #include <thunar/thunar-private.h>
>-- 
>2.9.2
>
Comment 7 Ivan 83 2017-05-09 04:29:22 CEST
Comment on attachment 6860 
fix-permissions-editor-allow-edit-permissions

>From ae4be81679100e7f50b9a3dbd33ebbefff2d0e15 Mon Sep 17 00:00:00 2001
>From: ivan-83 <rozhuk.im@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
>
Comment 8 Andre Miranda editbugs 2018-07-17 01:03:45 CEST
Hi Ivan,
First of all, sorry for the long time it took for someone to review your patches.
The first patch (comment #0) doesn't make sense anymore, thunar_file_watch returns void.
The second patch (comment #2) doesn't apply anymore, but IIRC some improvement was made in this sense, could you please check?.
The "build-fix-without-HAVE_GIO_UNIX" patch looks good, I'm going to push to master.

Let me know if I have overlooked anything, I'll leave this bug open until you tell me about the sshfs permissions issue.
Comment 9 Git Bot editbugs 2018-07-17 01:04:50 CEST
ivan-83 referenced this bugreport in commit 0a6c2fd291e5a43729a126afa5d97e5bf0a17627

Fix build without HAVE_GIO_UNIX (Bug #12863)

https://git.xfce.org/xfce/thunar/commit?id=0a6c2fd291e5a43729a126afa5d97e5bf0a17627
Comment 10 Git Bot editbugs 2018-07-18 22:07:42 CEST
ivan-83 referenced this bugreport in commit 42d27382363d05f528040eba17ccbdcde5e158eb

Fix build without HAVE_GIO_UNIX (Bug #12863)

https://git.xfce.org/xfce/thunar/commit?id=42d27382363d05f528040eba17ccbdcde5e158eb
Comment 11 Ivan 83 2018-07-29 04:59:19 CEST
There was discussion: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202192

https://bugzilla.xfce.org/show_bug.cgi?id=12863#c4 - I still dont fix it.
Comment 12 alexxcons editbugs 2018-07-30 22:26:23 CEST
@ Ivan 83
> But I cant find how to force dir reload/update after permissions changed, so manual refresh required after permissions update to see new permissions.

"thunar_standard_view_reload" is the one triggered by "F5", probably the one you are searching for, right ?

Since latest commit it is as well available in the header ( thunar_standard_view.h )
Comment 13 alexxcons editbugs 2018-07-30 23:06:44 CEST
Argh, actually I just realized that I dont need it public. Will move it back to private within next patch of https://bugzilla.xfce.org/show_bug.cgi?id=14548

Feel free to move it back to public, if that solves your problem !
Comment 14 Git Bot editbugs 2019-05-20 21:59:10 CEST
ivan-83 referenced this bugreport in commit 7642cb7f76298b8bc916a810463604e4f89cbe88

Fix build without HAVE_GIO_UNIX (Bug #12863)

https://git.xfce.org/xfce/thunar/commit?id=7642cb7f76298b8bc916a810463604e4f89cbe88
Comment 15 alexxcons editbugs 2019-05-20 22:03:18 CEST
Applied the fix as well to the 4.12 branch (like said in Bug #15184) .... still something missing ?

If so, please open a new bug for it .. this one is already a bit messed up (please only one bug per bugreport)

Bug #12863

Reported by:
Ivan 83
Reported on: 2016-09-20
Last modified on: 2019-05-20

People

Assignee:
Xfce Bug Triage
CC List:
5 users

Version

Version:
1.6.11

Attachments

1 (723 bytes, patch)
2016-09-20 08:26 CEST , Ivan 83
no flags
remove-unneded-include (651 bytes, patch)
2016-09-20 08:27 CEST , Ivan 83
no flags
fix-permissions-editor-allow-edit-permissions (1.24 KB, patch)
2016-09-20 08:31 CEST , Ivan 83
rozhuk.im : review+
build-fix-without-HAVE_GIO_UNIX (1.46 KB, patch)
2016-09-20 08:35 CEST , Ivan 83
rozhuk.im : review+

Additional information