[tracker-miners/wip/carlosg/speed-track: 7/40] tracker-miner-fs: Drop tracker_miner_files_is_file_eligible()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker-miners/wip/carlosg/speed-track: 7/40] tracker-miner-fs: Drop tracker_miner_files_is_file_eligible()
- Date: Sun, 18 Oct 2020 20:58:43 +0000 (UTC)
commit cad04f97c2cb9504a7023d732de0edbb82c011bb
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Oct 4 17:38:51 2020 +0200
tracker-miner-fs: Drop tracker_miner_files_is_file_eligible()
Since commit 26f3ba3dda8, this is not as useful as it used to be. Since
the previous commit, it's completely unused, can be dropped now.
src/miners/fs/tracker-miner-files.c | 101 ------------------------------------
src/miners/fs/tracker-miner-files.h | 2 -
2 files changed, 103 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-files.c b/src/miners/fs/tracker-miner-files.c
index 6bfddfb47..0ae7e7052 100644
--- a/src/miners/fs/tracker-miner-files.c
+++ b/src/miners/fs/tracker-miner-files.c
@@ -2918,107 +2918,6 @@ miner_files_add_removable_or_optical_directory (TrackerMinerFiles *mf,
g_object_unref (mount_point_file);
}
-gboolean
-tracker_miner_files_is_file_eligible (TrackerMinerFiles *miner,
- GFile *file)
-{
- TrackerConfig *config;
- GFile *dir;
- GFileInfo *file_info;
- gboolean is_dir;
-
- file_info = g_file_query_info (file,
- G_FILE_ATTRIBUTE_STANDARD_TYPE,
- G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
- NULL, NULL);
-
- if (!file_info) {
- /* file does not exist */
- return FALSE;
- }
-
- is_dir = (g_file_info_get_file_type (file_info) == G_FILE_TYPE_DIRECTORY);
- g_object_unref (file_info);
-
- g_object_get (miner,
- "config", &config,
- NULL);
-
- if (is_dir) {
- dir = g_object_ref (file);
- } else {
- if (!tracker_miner_files_check_file (file,
- tracker_config_get_ignored_file_paths (config),
- tracker_config_get_ignored_file_patterns (config))) {
- /* file is not eligible to be indexed */
- g_object_unref (config);
- return FALSE;
- }
-
- dir = g_file_get_parent (file);
- }
-
- if (dir) {
- gboolean found = FALSE;
- GSList *l;
-
- if (!tracker_miner_files_check_directory (dir,
- tracker_config_get_index_recursive_directories
(config),
- tracker_config_get_index_single_directories
(config),
- tracker_config_get_ignored_directory_paths (config),
- tracker_config_get_ignored_directory_patterns
(config))) {
- /* file is not eligible to be indexed */
- g_object_unref (dir);
- g_object_unref (config);
- return FALSE;
- }
-
- l = tracker_config_get_index_recursive_directories (config);
-
- while (l && !found) {
- GFile *config_dir;
-
- config_dir = g_file_new_for_path ((gchar *) l->data);
-
- if (g_file_equal (dir, config_dir) ||
- g_file_has_prefix (dir, config_dir)) {
- found = TRUE;
- }
-
- g_object_unref (config_dir);
- l = l->next;
- }
-
- l = tracker_config_get_index_single_directories (config);
-
- while (l && !found) {
- GFile *config_dir;
-
- config_dir = g_file_new_for_path ((gchar *) l->data);
-
- if (g_file_equal (dir, config_dir)) {
- found = TRUE;
- }
-
- g_object_unref (config_dir);
- l = l->next;
- }
-
- g_object_unref (dir);
-
- if (!found) {
- /* file is not eligible to be indexed */
- g_object_unref (config);
- return FALSE;
- }
- }
-
- g_object_unref (config);
-
- /* file is eligible to be indexed */
- return TRUE;
-}
-
inline static gchar *
get_first_index_filename (TrackerMinerFiles *mf)
{
diff --git a/src/miners/fs/tracker-miner-files.h b/src/miners/fs/tracker-miner-files.h
index f77603410..565a50aea 100644
--- a/src/miners/fs/tracker-miner-files.h
+++ b/src/miners/fs/tracker-miner-files.h
@@ -65,8 +65,6 @@ gboolean tracker_miner_files_check_directory (GFile *f
gboolean tracker_miner_files_monitor_directory (GFile *file,
gboolean enable_monitors,
GSList *directories_to_check);
-gboolean tracker_miner_files_is_file_eligible (TrackerMinerFiles *miner,
- GFile *file);
/* Global functions to handle timestamp files */
gboolean tracker_miner_files_get_first_index_done (TrackerMinerFiles *mf);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]