[tracker/rss-enclosures] Fixes GB#621015: Index removable media when miner-fs starts and configured to do so
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] Fixes GB#621015: Index removable media when miner-fs starts and configured to do so
- Date: Sat, 26 Jun 2010 23:21:22 +0000 (UTC)
commit e5066a235637c2a6b1ffc89422c034ac449e1f31
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Jun 15 17:38:59 2010 +0200
Fixes GB#621015: Index removable media when miner-fs starts and configured to do so
src/libtracker-miner/tracker-storage.c | 4 ++--
src/miners/fs/tracker-miner-files.c | 18 +++++++++++-------
2 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-storage.c b/src/libtracker-miner/tracker-storage.c
index 9fde62e..df7f7e8 100644
--- a/src/libtracker-miner/tracker-storage.c
+++ b/src/libtracker-miner/tracker-storage.c
@@ -751,7 +751,7 @@ get_mount_point_by_uuid_foreach (gpointer key,
/* is mount of the type we're looking for? */
if ((gr->exact_match && mount_type == gr->type) ||
- (!gr->exact_match && ((mount_type & gr->type) == gr->type))) {
+ (!gr->exact_match && (mount_type & gr->type))) {
gchar *normalized_mount_point;
gint len;
@@ -842,7 +842,7 @@ tracker_storage_get_device_uuids (TrackerStorage *storage,
/* is mount of the type we're looking for? */
if ((exact_match && mount_type == type) ||
- (!exact_match && ((mount_type & type) == type))) {
+ (!exact_match && (mount_type & type))) {
uuids = g_slist_prepend (uuids, g_strdup (uuid));
}
}
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index ddb86ac..1611a5a 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -350,9 +350,8 @@ miner_files_constructed (GObject *object)
TrackerMinerFS *fs;
GSList *dirs;
GSList *mounts = NULL, *m;
- gboolean index_removable_devices;
- gboolean index_optical_discs;
- TrackerStorageType type = 0;
+ gboolean index_removable_devices = FALSE;
+ gboolean index_optical_discs = FALSE;
G_OBJECT_CLASS (tracker_miner_files_parent_class)->constructed (object);
@@ -366,16 +365,21 @@ miner_files_constructed (GObject *object)
if (tracker_config_get_index_removable_devices (mf->private->config)) {
index_removable_devices = TRUE;
- type |= TRACKER_STORAGE_REMOVABLE;
+ /* Get list of roots for removable devices (excluding optical) */
+ mounts = tracker_storage_get_device_roots (mf->private->storage,
+ TRACKER_STORAGE_REMOVABLE,
+ TRUE);
}
if (tracker_config_get_index_optical_discs (mf->private->config)) {
index_optical_discs = TRUE;
- type |= TRACKER_STORAGE_OPTICAL;
+ /* Get list of roots for removable+optical devices */
+ m = tracker_storage_get_device_roots (mf->private->storage,
+ TRACKER_STORAGE_OPTICAL | TRACKER_STORAGE_REMOVABLE,
+ TRUE);
+ mounts = g_slist_concat (mounts, m);
}
- mounts = tracker_storage_get_device_roots (mf->private->storage, type, TRUE);
-
#if defined(HAVE_UPOWER) || defined(HAVE_HAL)
check_battery_status (mf);
#endif /* defined(HAVE_UPOWER) || defined(HAVE_HAL) */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]