[tracker] Fixes NB#158450: Tracker doesn't remove song from database when ...
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Fixes NB#158450: Tracker doesn't remove song from database when ...
- Date: Wed, 3 Mar 2010 13:07:18 +0000 (UTC)
commit 86cb74744f86c627ef784e7d578d3bd8a5861936
Author: Carlos Garnacho <carlos lanedo com>
Date: Wed Mar 3 13:55:09 2010 +0100
Fixes NB#158450: Tracker doesn't remove song from database when ...
Remove too lax check for not monitoring IndexSingleDirectories children, which
was also affecting legit dirs in IndexRecursiveDirectories which were a child
of the former.
TrackerMinerFS should only emit monitor_directory() for directories where both
check_directory() and check_directory_contents() have returned TRUE, We're
actually interested in monitoring any directory (and children) in
IndexRecursiveDirectories where that does happen, and the latter call shouldn't
happen for children of IndexSingleDirectories, so it's safe to just return TRUE
there.
src/tracker-miner-fs/tracker-miner-files.c | 24 ++++--------------------
1 files changed, 4 insertions(+), 20 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-miner-files.c b/src/tracker-miner-fs/tracker-miner-files.c
index 3b75b36..9eb19d0 100644
--- a/src/tracker-miner-fs/tracker-miner-files.c
+++ b/src/tracker-miner-fs/tracker-miner-files.c
@@ -1355,7 +1355,6 @@ miner_files_monitor_directory (TrackerMinerFS *fs,
GFile *file)
{
TrackerMinerFiles *mf;
- GSList *list;
mf = TRACKER_MINER_FILES (fs);
@@ -1363,26 +1362,11 @@ miner_files_monitor_directory (TrackerMinerFS *fs,
return FALSE;
}
- /* We don't want child directories inside IndexSingleDirectories
- * to have a monitor added.
+ /* We'll only get this signal for the directories where check_directory()
+ * and check_directory_contents() returned TRUE, so by default we want
+ * these directories to be indexed.
*/
- for (list = mf->private->index_single_directories; list; list = list->next) {
- gboolean is_child = FALSE;
- GFile *dir;
-
- dir = g_file_new_for_path (list->data);
- is_child = g_file_has_prefix (file, dir);
- g_object_unref (dir);
-
- if (is_child) {
- return FALSE;
- }
- }
-
- /* Fallback to the check directory routine, since we don't
- * monitor anything we don't process.
- */
- return miner_files_check_directory (fs, file);
+ return TRUE;
}
static const gchar *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]