|
1 |
From 4dd549db77838c9345f10a72f10e705f8ae327d4 Mon Sep 17 00:00:00 2001 |
|
2 |
From: Viktor Odintsev <zakhams@gmail.com> |
|
3 |
Date: Thu, 13 Apr 2017 01:15:53 +0300 |
|
4 |
Subject: Fix deadlock in mutex causing Thunar to hang (Bug #13481) |
|
5 |
|
|
6 |
file_rename_mutex could remain locked due to the return statement |
|
7 |
in function thunar_file_monitor. |
|
8 |
--- |
|
9 |
thunar/thunar-file.c | 16 ++++++++-------- |
|
10 |
1 file changed, 8 insertions(+), 8 deletions(-) |
|
11 |
|
|
12 |
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c |
|
13 |
index c7aae58..53bebbc 100644 |
|
14 |
--- a/thunar/thunar-file.c |
|
15 |
+++ b/thunar/thunar-file.c |
|
16 |
@@ -827,16 +827,16 @@ thunar_file_monitor (GFileMonitor *monitor, |
|
17 |
else |
|
18 |
other_file = thunar_file_get (other_path, NULL); |
|
19 |
|
|
20 |
- if (other_file == NULL) |
|
21 |
- return; |
|
22 |
- |
|
23 |
- /* notify the thumbnail cache that we can now also move the thumbnail */ |
|
24 |
- thunar_file_move_thumbnail_cache_file (event_path, other_path); |
|
25 |
+ if (other_file != NULL) |
|
26 |
+ { |
|
27 |
+ /* notify the thumbnail cache that we can now also move the thumbnail */ |
|
28 |
+ thunar_file_move_thumbnail_cache_file (event_path, other_path); |
|
29 |
|
|
30 |
- /* reload the containing target folder */ |
|
31 |
- thunar_file_reload_parent (other_file); |
|
32 |
+ /* reload the containing target folder */ |
|
33 |
+ thunar_file_reload_parent (other_file); |
|
34 |
|
|
35 |
- g_object_unref (other_file); |
|
36 |
+ g_object_unref (other_file); |
|
37 |
+ } |
|
38 |
|
|
39 |
G_UNLOCK (file_rename_mutex); |
|
40 |
} |
|
41 |
-- |
|
42 |
cgit v1.1 |
|
43 |
|