[tracker/sam/comment] libtracker-miner: Add a comment



commit bc988668fa1966e21ed98d6d79544bed016a3f5d
Author: Sam Thursfield <sam afuera me uk>
Date:   Wed Nov 27 12:09:21 2019 +0100

    libtracker-miner: Add a comment
    
    Every time I look at this code I have forgotten how it works, so let's
    document it.

 src/libtracker-miner/tracker-file-notifier.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
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)) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]