[tracker/miner-userguide: 15/15] tracker-miner-fs: Add initial check on basedir to avoid subsequent checks
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-userguide: 15/15] tracker-miner-fs: Add initial check on basedir to avoid subsequent checks
- Date: Fri, 25 Nov 2011 10:21:38 +0000 (UTC)
commit 2ce049765015751b39b5b6754299eda1232867b7
Author: Martyn Russell <martyn lanedo com>
Date: Thu Nov 24 16:32:24 2011 +0000
tracker-miner-fs: Add initial check on basedir to avoid subsequent checks
src/miners/fs/tracker-miner-userguides.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-userguides.c b/src/miners/fs/tracker-miner-userguides.c
index 2910264..1088bac 100644
--- a/src/miners/fs/tracker-miner-userguides.c
+++ b/src/miners/fs/tracker-miner-userguides.c
@@ -146,6 +146,16 @@ miner_userguides_basedir_add (TrackerMinerFS *fs,
gchar *path;
gboolean added = FALSE;
+ /* Do preliminary check on basedir */
+ path = g_build_filename (basedir, "userguide", "contents", NULL);
+ if (!g_file_test (path, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
+ g_message (" No userguides in prefix:'%s'", path);
+ g_free (path);
+ return;
+ }
+
+ g_free (path);
+
/* Without MeeGoTouch, we simply index ALL content. */
#ifdef HAVE_MEEGOTOUCH
gchar *locale;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]