Closed ids1024 closed 3 years ago
Confirmed this fixes the crash reported in https://github.com/pop-os/gnome-control-center/pull/150 on a Focal machine. These options don't seem to actually take effect in the Activities overview search results like the Search page's description would indicate, but that is not a regression (this may have to do with how Tracker is indexing and storing the results.)
While directories are hidden from the list when they're set to $HOME
using user-dirs.dirs
, those directories will stay in the org.freedesktop.Tracker.Miner.Files index-recursive-directories
gsetting if they were enabled before this change was made. If they were disabled before this change was made, they won't be listed in that gsetting. Knowing this, it seems like maybe the option should still be displayed for the directories configured as $HOME
, rather than being hidden.
@ids1024 Thoughts on if this is actually an issue? If we're changing from get_user_special_dir_if_not_home
to g_get_user_special_dir
, judging just from what those functions are called and the description of the new function being used, I would expect the on/off switches to still show up for items that are set to $HOME
, so the option to index them doesn't get stuck on.
Actually, I see that if I set one of the special directories to any other directory, I get a custom on/off switch for that directory:
In this example, I set XDG_PICTURES_DIR
to $HOME/Pictures-Custom
, and enabling/disabling the Pictures-Custom
switch adds/removes &PICTURES
to/from the gsetting. So maybe this is a separate issue where the Home
on/off switch should control any of the directories set to $HOME
in the gsetting. (It seems like duplicates aren't handled well; if I set XDG_VIDEOS_DIR
to also point to $HOME/Pictures-Custom
, I only get a single on/off switch, it only controls &PICTURES
, &VIDEOS
is stuck on in the gsetting, and I start getting g_file_equal: assertion 'G_IS_FILE (file1)' failed
messages again.)
those directories will stay in the org.freedesktop.Tracker.Miner.Files index-recursive-directories gsetting if they were enabled before this change was made.
Hm, that does seem like a bug.
judging just from what those functions are called and the description of the new function being used, I would expect the on/off switches to still show up for items that are set to $HOME, so the option to index them doesn't get stuck on.
The part of the code changed here isn't the part that determines whether or not they are shown.
So I think that's a bug that already existed, albeit somewhat hidden by the fact g-c-c could segfault before you could see how it behaves.
Fixes https://github.com/pop-os/gnome-control-center/issues/149