From 4dd549db77838c9345f10a72f10e705f8ae327d4 Mon Sep 17 00:00:00 2001 From: Viktor Odintsev Date: Thu, 13 Apr 2017 01:15:53 +0300 Subject: Fix deadlock in mutex causing Thunar to hang (Bug #13481) file_rename_mutex could remain locked due to the return statement in function thunar_file_monitor. --- thunar/thunar-file.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c index c7aae58..53bebbc 100644 --- a/thunar/thunar-file.c +++ b/thunar/thunar-file.c @@ -827,16 +827,16 @@ thunar_file_monitor (GFileMonitor *monitor, else other_file = thunar_file_get (other_path, NULL); - if (other_file == NULL) - return; - - /* notify the thumbnail cache that we can now also move the thumbnail */ - thunar_file_move_thumbnail_cache_file (event_path, other_path); + if (other_file != NULL) + { + /* notify the thumbnail cache that we can now also move the thumbnail */ + thunar_file_move_thumbnail_cache_file (event_path, other_path); - /* reload the containing target folder */ - thunar_file_reload_parent (other_file); + /* reload the containing target folder */ + thunar_file_reload_parent (other_file); - g_object_unref (other_file); + g_object_unref (other_file); + } G_UNLOCK (file_rename_mutex); } -- cgit v1.1