[tracker] libtracker-miner: allow to modify miners path in env variable



commit d1fa5df84ce0b5c27f28a061f74e7659dd3e6422
Author: Ivan Frade <ivan frade nokia com>
Date:   Tue Mar 16 11:48:20 2010 +0200

    libtracker-miner: allow to modify miners path in env variable
    
    Needed for proper testing

 src/libtracker-miner/tracker-miner-manager.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-manager.c b/src/libtracker-miner/tracker-miner-manager.c
index 9e2579e..b8aa18d 100644
--- a/src/libtracker-miner/tracker-miner-manager.c
+++ b/src/libtracker-miner/tracker-miner-manager.c
@@ -540,7 +540,7 @@ initialize_miners_data (TrackerMinerManager *manager)
 	GMainLoop *main_loop;
 	GFile *file;
 	TrackerCrawler *crawler;
-
+        const gchar    *miners_dir;
 	crawler = tracker_crawler_new ();
 	main_loop = g_main_loop_new (NULL, FALSE);
 
@@ -552,7 +552,14 @@ initialize_miners_data (TrackerMinerManager *manager)
 	                  main_loop);
 
 	/* Go through service files */
-	file = g_file_new_for_path (TRACKER_MINERS_DIR);
+        miners_dir = g_getenv ("TRACKER_MINERS_DIR");
+        if (G_LIKELY (miners_dir == NULL)) {
+                miners_dir = TRACKER_MINERS_DIR ;
+        } else {
+                g_message ("Crawling miners in '%s' (set in env)", miners_dir);
+        }
+
+	file = g_file_new_for_path (miners_dir);
 	tracker_crawler_start (crawler, file, TRUE);
 	g_object_unref (file);
 



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