From b4860962453577012765b9968df7c5ddacbe7b11 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Tue, 2 Jul 2019 01:24:10 +0300 Subject: [PATCH] Get rid of bitwise AND in logical expression (Bug #15352) Bitwise AND seems to produce the correct result but it's not the right way to go about it. Better to be less fancy and use the proper boolean operator. Fixes my previous commit e0f50533edc8abcff0e478f423e290c786ce82ed. --- thunar/thunar-standard-view.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c index 17b1baa3..5e66a11d 100644 --- a/thunar/thunar-standard-view.c +++ b/thunar/thunar-standard-view.c @@ -4522,10 +4522,9 @@ thunar_standard_view_selection_changed (ThunarStandardView *standard_view) writable = (current_directory != NULL && thunar_file_is_writable (current_directory)); trashed = (current_directory != NULL && thunar_file_is_trashed (current_directory)); - /* if moving to trash is not applicable, replace it with the delete action */ - hide_trash_action = trashed || !trashable || !thunar_g_vfs_is_uri_scheme_supported ("trash"); - /* but only if the directory is writable -- keep "move to trash" otherwise */ - hide_trash_action &= writable; + /* if moving to trash is not applicable, replace it with the delete action + * but only if the directory is writable -- keep "move to trash" otherwise */ + hide_trash_action = writable && (trashed || !trashable || !thunar_g_vfs_is_uri_scheme_supported ("trash")); g_object_get (G_OBJECT (standard_view->preferences), "misc-show-delete-action", &show_delete_action, NULL); -- 2.22.0