[tracker] libtracker-miner: Dispose regular files from the filesystem cache on monitor events
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] libtracker-miner: Dispose regular files from the filesystem cache on monitor events
- Date: Wed, 13 Mar 2013 16:56:49 +0000 (UTC)
commit b5ca58d7bcc6098db27256ae523f9fb362e0124c
Author: Carlos Garnacho <carlos lanedo com>
Date: Wed Mar 13 12:53:11 2013 +0100
libtracker-miner: Dispose regular files from the filesystem cache on monitor events
Regular files gotten through monitor events persisted in the filesystem cache
after those events were processed, whereas on other situations TrackerFileNotifier
just keeps directories to remain cached and disposes all regular files, so make
behavior on monitor events respect that.
src/libtracker-miner/tracker-file-notifier.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index ff9b971..c0051ec 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -730,6 +730,11 @@ monitor_item_created_cb (TrackerMonitor *monitor,
file, file_type, NULL);
g_signal_emit (notifier, signals[FILE_CREATED], 0, canonical);
+
+ if (!is_directory) {
+ tracker_file_system_forget_files (priv->file_system, canonical,
+ G_FILE_TYPE_REGULAR);
+ }
}
static void
@@ -755,6 +760,11 @@ monitor_item_updated_cb (TrackerMonitor *monitor,
canonical = tracker_file_system_get_file (priv->file_system,
file, file_type, NULL);
g_signal_emit (notifier, signals[FILE_UPDATED], 0, canonical, FALSE);
+
+ if (!is_directory) {
+ tracker_file_system_forget_files (priv->file_system, canonical,
+ G_FILE_TYPE_REGULAR);
+ }
}
static void
@@ -780,6 +790,11 @@ monitor_item_attribute_updated_cb (TrackerMonitor *monitor,
canonical = tracker_file_system_get_file (priv->file_system,
file, file_type, NULL);
g_signal_emit (notifier, signals[FILE_UPDATED], 0, canonical, TRUE);
+
+ if (!is_directory) {
+ tracker_file_system_forget_files (priv->file_system, canonical,
+ G_FILE_TYPE_REGULAR);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]