From a4d52ac6fdf5637957615b748f045316272ad64b Mon Sep 17 00:00:00 2001 From: Alexander Schwinn Date: Thu, 18 Jul 2019 10:49:38 +0200 Subject: [PATCH 2/2] Show debug message if creating a folder monitor failed --- thunar/thunar-folder.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/thunar/thunar-folder.c b/thunar/thunar-folder.c index 5d5e2f8f..d04c34d8 100644 --- a/thunar/thunar-folder.c +++ b/thunar/thunar-folder.c @@ -136,12 +136,18 @@ static void thunar_folder_constructed (GObject *object) { ThunarFolder *folder = THUNAR_FOLDER (object); + GError *error = NULL; /* add us to the folder alteration monitor */ folder->monitor = g_file_monitor_directory (thunar_file_get_file (folder->corresponding_file), - G_FILE_MONITOR_SEND_MOVED, NULL, NULL); + G_FILE_MONITOR_SEND_MOVED, NULL, &error); if (G_LIKELY (folder->monitor != NULL)) g_signal_connect (folder->monitor, "changed", G_CALLBACK (thunar_folder_monitor), folder); + else + { + g_debug ("Could not create folder monitor: %s", error->message); + g_error_free (error); + } G_OBJECT_CLASS (thunar_folder_parent_class)->constructed (object); } -- 2.11.0