[tracker-miners/sam/downloads-non-recursive] Don't recurse into subdirectories when indexing ~/Downloads



commit d97cf22273506bd542e0cc30733881082c570070
Author: Sam Thursfield <sam afuera me uk>
Date:   Sun Jun 2 21:57:26 2019 +0200

    Don't recurse into subdirectories when indexing ~/Downloads
    
    We can't really make assumptions about the content of folders in
    the 'Downloads' directory. People may download any kind of content
    from the internet and then extract it "in place" in the Downloads
    directory.
    
    This change was triggered by
    https://gitlab.gnome.org/GNOME/tracker/issues/95 where several
    users reported system lockups caused by Tracker scanning video
    game data. The goal of this change is not to avoid the lockups,
    but to avoid scanning game data directories in the first place.
    Games often contain lots of audio, video, images and text files,
    which can end up in unwanted places like Gnome Photos and Gnome
    Music if we do scan it with Tracker.
    
    This commit changes the default settings so that we index files in
    ~/Downloads but not directories. Hopefully this gives the right
    balance between: providing search results for files the user
    just downloaded, but not mixing up video game data with actual user
    content, and not consuming lots of resources unnecessarily.

 data/org.freedesktop.Tracker.Miner.Files.gschema.xml | 4 ++--
 src/miners/fs/tracker-main.c                         | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/data/org.freedesktop.Tracker.Miner.Files.gschema.xml 
b/data/org.freedesktop.Tracker.Miner.Files.gschema.xml
index d66ff97d7..77a7579c9 100644
--- a/data/org.freedesktop.Tracker.Miner.Files.gschema.xml
+++ b/data/org.freedesktop.Tracker.Miner.Files.gschema.xml
@@ -126,7 +126,7 @@ Boston, MA  02110-1301, USA.
 
        See /etc/xdg/user-dirs.defaults and $HOME/.config/user-dirs.default
       </description>
-      <default>[ '&amp;DESKTOP', '&amp;DOCUMENTS', '&amp;DOWNLOAD', '&amp;MUSIC', '&amp;PICTURES', 
'&amp;VIDEOS' ]</default>
+      <default>[ '&amp;DESKTOP', '&amp;DOCUMENTS', '&amp;MUSIC', '&amp;PICTURES', '&amp;VIDEOS' ]</default>
     </key>
 
     <key name="index-single-directories" type="as">
@@ -138,7 +138,7 @@ Boston, MA  02110-1301, USA.
 
        See /etc/xdg/user-dirs.defaults and $HOME/.config/user-dirs.default
       </description>
-      <default>[ '$HOME' ]</default>
+      <default>[ '$HOME', '&amp;DOWNLOAD' ]</default>
     </key>
 
     <key name="ignored-files" type="as">
diff --git a/src/miners/fs/tracker-main.c b/src/miners/fs/tracker-main.c
index a6b853d09..c5aa3e25c 100644
--- a/src/miners/fs/tracker-main.c
+++ b/src/miners/fs/tracker-main.c
@@ -422,7 +422,8 @@ miner_finished_cb (TrackerMinerFS *fs,
         * the mainloop and exit.
         */
        if (no_daemon && main_loop) {
-               g_main_loop_quit (main_loop);
+               // FIXME: wait for extractor to finish
+/*             g_main_loop_quit (main_loop);*/
        }
 }
 


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