[tracker-miners/wip/carlosg/shuffle-libtracker-miner: 35/116] libtracker-miner: Always use interned files when emitting ::file-deleted



commit a92226dc7b3d3a7c28a29f2512ae266271dc3bb1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Oct 20 02:18:09 2017 +0200

    libtracker-miner: Always use interned files when emitting ::file-deleted
    
    There were other places that didn't ensure that TrackerFileNotifier used
    interned files when emitting ::file-* signals.

 src/libtracker-miner/tracker-file-notifier.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index 491412ef7..0ff190c90 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -1104,9 +1104,17 @@ monitor_item_created_cb (TrackerMonitor *monitor,
                                /* New file triggered a directory content
                                 * filter, remove parent directory altogether
                                 */
-                               g_signal_emit (notifier, signals[FILE_DELETED], 0, parent);
-                               file_notifier_current_root_check_remove_directory (notifier, parent);
+                               canonical = tracker_file_system_get_file (priv->file_system,
+                                                                         parent, G_FILE_TYPE_DIRECTORY,
+                                                                         NULL);
                                g_object_unref (parent);
+
+                               g_object_ref (canonical);
+                               g_signal_emit (notifier, signals[FILE_DELETED], 0, canonical);
+                               file_notifier_current_root_check_remove_directory (notifier, canonical);
+                               tracker_file_system_forget_files (priv->file_system, canonical,
+                                                                 G_FILE_TYPE_UNKNOWN);
+                               g_object_unref (canonical);
                                return;
                        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]