[tracker/libtracker-miner] TrackerMinerFiles: Ignore hidden files and directories.
- From: Carlos Garnacho <carlosg src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-miner] TrackerMinerFiles: Ignore hidden files and directories.
- Date: Tue, 25 Aug 2009 09:50:13 +0000 (UTC)
commit 55a7a80c2bd94cd42b1ac5b6fbbb72a2dade7400
Author: Carlos Garnacho <carlos lanedo com>
Date: Tue Aug 25 11:47:33 2009 +0200
TrackerMinerFiles: Ignore hidden files and directories.
src/tracker-miner-fs/tracker-miner-files.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-miner-fs/tracker-miner-files.c b/src/tracker-miner-fs/tracker-miner-files.c
index 29ea148..8c939b5 100644
--- a/src/tracker-miner-fs/tracker-miner-files.c
+++ b/src/tracker-miner-fs/tracker-miner-files.c
@@ -254,7 +254,20 @@ static gboolean
tracker_miner_files_check_file (TrackerMinerProcess *miner,
GFile *file)
{
+ GFileInfo *file_info;
+
/* FIXME: Check config */
+
+ file_info = g_file_query_info (file,
+ "standard::is-hidden",
+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+ NULL, NULL);
+
+ if (g_file_info_get_is_hidden (file_info)) {
+ /* Ignore hidden files */
+ return FALSE;
+ }
+
return TRUE;
}
@@ -262,7 +275,20 @@ static gboolean
tracker_miner_files_check_directory (TrackerMinerProcess *miner,
GFile *file)
{
+ GFileInfo *file_info;
+
/* FIXME: Check config */
+
+ file_info = g_file_query_info (file,
+ "standard::is-hidden",
+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+ NULL, NULL);
+
+ if (g_file_info_get_is_hidden (file_info)) {
+ /* Ignore hidden dirs */
+ return FALSE;
+ }
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]