From 702a853ae41c888b0888f95a74ea0b8fe9dbc5a6 Mon Sep 17 00:00:00 2001 From: Viktor Odintsev Date: Thu, 13 Apr 2017 01:15:53 +0300 Subject: [PATCH] Deadlock fix 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 c7aae58a..53bebbcd 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); } -- 2.12.2