[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: Thu, 24 Nov 2011 16:44:24 +0000 (UTC)
commit 913cccdfe7e839655802cd30c7867169060ec63f
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 822ff79..8909a02 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]