[tracker] TrackerMinerFS: Do not query parent URN frequently if it doesn't exist.
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] TrackerMinerFS: Do not query parent URN frequently if it doesn't exist.
- Date: Thu, 22 Apr 2010 14:25:51 +0000 (UTC)
commit 5a3375e8276ea89449bdeb0a146b73f74b97fdb6
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Apr 21 14:02:30 2010 +0200
TrackerMinerFS: Do not query parent URN frequently if it doesn't exist.
This is specially visible in the applications miner, since the container
directories aren't actually stored.
src/libtracker-miner/tracker-miner-fs.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index c4d02b5..17e7f18 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -1238,10 +1238,9 @@ item_add_or_update (TrackerMinerFS *fs,
g_free (fs->private->current_parent_urn);
- if (item_query_exists (fs, parent, &fs->private->current_parent_urn, NULL))
- fs->private->current_parent = g_object_ref (parent);
- else {
- fs->private->current_parent = NULL;
+ fs->private->current_parent = g_object_ref (parent);
+
+ if (!item_query_exists (fs, parent, &fs->private->current_parent_urn, NULL)) {
fs->private->current_parent_urn = NULL;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]