summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2019-11-27 12:09:21 +0100
committerSam Thursfield <sam@afuera.me.uk>2019-11-27 14:55:24 +0100
commitbc988668fa1966e21ed98d6d79544bed016a3f5d (patch)
treedf1388b5e8ba86b3a783f6d792ba0c301234edde
parentac0dc2d85053420d40b35837cc47b223475bb366 (diff)
downloadtracker-sam/comment.tar.gz
libtracker-miner: Add a commentsam/comment
Every time I look at this code I have forgotten how it works, so let's document it.
-rw-r--r--src/libtracker-miner/tracker-file-notifier.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libtracker-miner/tracker-file-notifier.c b/src/libtracker-miner/tracker-file-notifier.c
index d1070c14d..addb9c5c2 100644
--- a/src/libtracker-miner/tracker-file-notifier.c
+++ b/src/libtracker-miner/tracker-file-notifier.c
@@ -649,6 +649,16 @@ crawl_directory_in_current_root (TrackerFileNotifier *notifier)
g_object_unref (priv->cancellable);
priv->cancellable = g_cancellable_new ();
+ /* Begin crawling the directory non-recursively.
+ *
+ * - We receive ::check-file, ::check-directory and ::check-directory-contents signals
+ * during the crawl, which control which directories are crawled and which files are
+ * returned.
+ * - We receive ::directory-crawled each time a directory crawl completes. This provides
+ * the list of contents for a directory.
+ * - We receive ::finished when the crawler completes.
+ *
+ */
if (!tracker_crawler_start (priv->crawler,
directory,
priv->current_index_root->flags)) {