[Xfce4-commits] [xfce/thunar] 01/01: Don't try to load menu providers if current dir is invalid

noreply at xfce.org noreply at xfce.org
Sun Jul 15 00:19:22 CEST 2018


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/thunar.

commit 2dd76b4cb5221aeef68d7adc755e6370a6b03d6d
Author: Andre Miranda <andreldm at xfce.org>
Date:   Sat Jul 14 19:18:42 2018 -0300

    Don't try to load menu providers if current dir is invalid
---
 thunar/thunar-window.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c
index 6db84bf..ebe50af 100644
--- a/thunar/thunar-window.c
+++ b/thunar/thunar-window.c
@@ -3443,14 +3443,18 @@ thunar_window_update_custom_actions (ThunarView   *view,
       || window->view != GTK_WIDGET (view))
     return;
 
+  /* grab a reference to the current directory of the window */
+  folder = thunar_window_get_current_directory (window);
+
+  /* leave if current directory is invalid */
+  if (!thunarx_file_info_is_directory (THUNARX_FILE_INFO (folder)))
+      return;
+
   /* load the menu provides from the provider factory */
   providers = thunarx_provider_factory_list_providers (window->provider_factory,
                                                        THUNARX_TYPE_MENU_PROVIDER);
   if (G_LIKELY (providers != NULL))
     {
-      /* grab a reference to the current directory of the window */
-      folder = thunar_window_get_current_directory (window);
-
       /* get a list of selected files */
       selected_files = thunar_component_get_selected_files (THUNAR_COMPONENT (view));
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list