Commit 0c60dffd authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-miner: Remove existence check

When crawling over a directory, we first check that the directory
exists. This is kinda pointless, as we can delay this error to
the moment we open the enumerator.
parent 4e933ec1
......@@ -893,7 +893,6 @@ tracker_crawler_get (TrackerCrawler *crawler,
TrackerCrawlerPrivate *priv;
DirectoryProcessingData *dir_data;
DirectoryRootInfo *info;
gboolean enable_stat;
GTask *task;
g_return_if_fail (TRACKER_IS_CRAWLER (crawler));
......@@ -901,8 +900,6 @@ tracker_crawler_get (TrackerCrawler *crawler,
priv = tracker_crawler_get_instance_private (crawler);
enable_stat = (flags & TRACKER_DIRECTORY_FLAG_NO_STAT) == 0;
info = directory_root_info_new (file, priv->file_attributes, flags);
task = g_task_new (crawler, cancellable, callback, user_data);
g_task_set_task_data (task, info,
......@@ -910,15 +907,6 @@ tracker_crawler_get (TrackerCrawler *crawler,
info->task = task;
info->crawler = crawler;
if (enable_stat && !g_file_query_exists (file, NULL)) {
/* This shouldn't happen, unless the removal/unmount notification
* didn't yet reach the TrackerFileNotifier.
*/
g_task_return_boolean (task, FALSE);
g_object_unref (task);
return;
}
if (!check_directory (crawler, info, file)) {
g_task_return_boolean (task, FALSE);
g_object_unref (task);
......
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