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
Created attachment 6859 remove-unneded-include
Created attachment 6860 fix-permissions-editor-allow-edit-permissions
Created attachment 6861 build-fix-without-HAVE_GIO_UNIX
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 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 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 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 >
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.
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
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
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.
@ 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 )
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 !
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
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)