[tracker] tracker-miner-fs: Use tracker_file_is_hidden()
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-miner-fs: Use tracker_file_is_hidden()
- Date: Wed, 1 Dec 2010 10:23:59 +0000 (UTC)
commit 7a1cbd264dc125a9abaa1d8d7b28956bc6eb0e1c
Author: Aleksander Morgado <aleksander lanedo com>
Date: Wed Dec 1 11:23:31 2010 +0100
tracker-miner-fs: Use tracker_file_is_hidden()
src/miners/fs/tracker-miner-files.c | 27 ++-------------------------
1 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index b23bede..f7e6f3a 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2474,28 +2474,20 @@ tracker_miner_files_check_file (GFile *file,
GSList *ignored_file_paths,
GSList *ignored_file_patterns)
{
- GFileInfo *file_info;
GSList *l;
gchar *basename;
gchar *path;
gboolean should_process;
- file_info = NULL;
should_process = FALSE;
basename = NULL;
path = NULL;
- file_info = g_file_query_info (file,
- G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN,
- G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
- NULL, NULL);
-
- if (file_info && g_file_info_get_is_hidden (file_info)) {
+ if (tracker_file_is_hidden (file)) {
/* Ignore hidden files */
goto done;
}
-
path = g_file_get_path (file);
for (l = ignored_file_paths; l; l = l->next) {
@@ -2518,10 +2510,6 @@ done:
g_free (basename);
g_free (path);
- if (file_info) {
- g_object_unref (file_info);
- }
-
return should_process;
}
@@ -2532,7 +2520,6 @@ tracker_miner_files_check_directory (GFile *file,
GSList *ignored_directory_paths,
GSList *ignored_directory_patterns)
{
- GFileInfo *file_info;
GSList *l;
gchar *basename;
gchar *path;
@@ -2542,18 +2529,12 @@ tracker_miner_files_check_directory (GFile *file,
should_process = FALSE;
basename = NULL;
- /* Most common things to ignore */
- file_info = g_file_query_info (file,
- G_FILE_ATTRIBUTE_STANDARD_IS_HIDDEN,
- G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
- NULL, NULL);
-
path = g_file_get_path (file);
/* First we check the GIO hidden check. This does a number of
* things for us which is good (like checking ".foo" dirs).
*/
- is_hidden = file_info && g_file_info_get_is_hidden (file_info);
+ is_hidden = tracker_file_is_hidden (file);
#ifdef __linux__
/* Second we check if the file is on FAT and if the hidden
@@ -2615,10 +2596,6 @@ tracker_miner_files_check_directory (GFile *file,
g_free (basename);
g_free (path);
- if (file_info) {
- g_object_unref (file_info);
- }
-
return should_process;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]