Commit 9dad9db7 authored by Carlos Garnacho's avatar Carlos Garnacho

tracker-miner-fs: Drop more unused functions

These functions are unused now.
parent 3fdb2b5c
......@@ -2618,152 +2618,6 @@ tracker_miner_files_new (TrackerSparqlConnection *connection,
NULL);
}
gboolean
tracker_miner_files_check_file (GFile *file,
GSList *ignored_file_paths,
GSList *ignored_file_patterns)
{
GSList *l;
gchar *basename;
gchar *path;
gboolean should_process;
should_process = FALSE;
basename = NULL;
path = NULL;
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) {
if (strcmp (l->data, path) == 0) {
goto done;
}
}
basename = g_file_get_basename (file);
for (l = ignored_file_patterns; l; l = l->next) {
if (g_pattern_match_string (l->data, basename)) {
goto done;
}
}
should_process = TRUE;
done:
g_free (basename);
g_free (path);
return should_process;
}
gboolean
tracker_miner_files_check_directory (GFile *file,
GSList *index_recursive_directories,
GSList *index_single_directories,
GSList *ignored_directory_paths,
GSList *ignored_directory_patterns)
{
GSList *l;
gchar *basename;
gchar *path;
gboolean should_process;
gboolean is_hidden;
should_process = FALSE;
basename = 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 = tracker_file_is_hidden (file);
#ifdef __linux__
/* Second we check if the file is on FAT and if the hidden
* attribute is set. GIO does this but ONLY on a Windows OS,
* not for Windows files under a Linux OS, so we have to check
* anyway.
*/
if (!is_hidden) {
int fd;
fd = g_open (path, O_RDONLY, 0);
if (fd != -1) {
__u32 attrs;
if (ioctl (fd, FAT_IOCTL_GET_ATTRIBUTES, &attrs) == 0) {
is_hidden = attrs & ATTR_HIDDEN ? TRUE : FALSE;
}
close (fd);
}
}
#endif /* __linux__ */
if (is_hidden) {
/* FIXME: We need to check if the file is actually a
* config specified location before blanket ignoring
* all hidden files.
*/
if (tracker_string_in_gslist (path, index_recursive_directories)) {
should_process = TRUE;
}
if (tracker_string_in_gslist (path, index_single_directories)) {
should_process = TRUE;
}
/* Ignore hidden dirs */
goto done;
}
for (l = ignored_directory_paths; l; l = l->next) {
if (strcmp (l->data, path) == 0) {
goto done;
}
}
basename = g_file_get_basename (file);
for (l = ignored_directory_patterns; l; l = l->next) {
if (g_pattern_match_string (l->data, basename)) {
goto done;
}
}
/* Check module directory ignore patterns */
should_process = TRUE;
done:
g_free (basename);
g_free (path);
return should_process;
}
gboolean
tracker_miner_files_monitor_directory (GFile *file,
gboolean enable_monitors,
GSList *directories_to_check)
{
if (!enable_monitors) {
return FALSE;
}
/* We'll only get this signal for the directories where check_directory()
* and check_directory_contents() returned TRUE, so by default we want
* these directories to be indexed. */
return TRUE;
}
static void
remove_files_in_removable_media_cb (GObject *object,
GAsyncResult *result,
......
......@@ -53,19 +53,6 @@ TrackerMiner *tracker_miner_files_new (TrackerSparqlConnect
const gchar *domain,
GError **error);
/* Convenience functions for --eligible tracker-miner-fs cmdline */
gboolean tracker_miner_files_check_file (GFile *file,
GSList *ignored_file_paths,
GSList *ignored_file_patterns);
gboolean tracker_miner_files_check_directory (GFile *file,
GSList *index_recursive_directories,
GSList *index_single_directories,
GSList *ignored_directory_paths,
GSList *ignored_directory_patterns);
gboolean tracker_miner_files_monitor_directory (GFile *file,
gboolean enable_monitors,
GSList *directories_to_check);
/* Global functions to handle timestamp files */
gboolean tracker_miner_files_get_first_index_done (TrackerMinerFiles *mf);
void tracker_miner_files_set_first_index_done (TrackerMinerFiles *mf,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment