Search Locations doesn't handle duplicate/identical XDG user dirs
If two or more XDG user dirs are set to the same directory, only one entry is present for the directory in the Search Locations dialog, but the Tracker gsettings still treat them separately. When disabling/enabling the directory in Search Locations, only one of the XDG user dirs are removed from/added to the gsetting. (As a result, the directory can become stuck on or off in the gsetting with no way to change that in the GUI.)
Steps to reproduce:
-
Create a custom directory inside of the home directory, e.g.
MyData
. -
Edit
~/.config/user-dirs.dirs
and set at least two of the XDG user dirs to the custom directory. -
Check the current Tracker settings:
gsettings get org.freedesktop.Tracker.Miner.Files index-recursive-directories
Confirm that more than one of the dirs using the custom directory are listed (in this example, Pictures and Videos.)
-
Check the Tracker settings again:
gsettings get org.freedesktop.Tracker.Miner.Files index-recursive-directories
Observe that one of the dirs using that directory was removed, but the others are still present.
Other notes: If I launch gnome-control-center
from the terminal, I also receive this output when interacting with the Search Locations dialog if more than one XDG data dir is set to the same location:
(gnome-control-center:3522): GLib-GIO-CRITICAL **: 14:00:33.038: g_file_equal: assertion 'G_IS_FILE (file1)' failed
(gnome-control-center:3522): GLib-GIO-CRITICAL **: 14:00:33.038: g_file_equal: assertion 'G_IS_FILE (file1)' failed
(gnome-control-center:3522): GLib-GIO-CRITICAL **: 14:02:35.423: g_file_equal: assertion 'G_IS_FILE (file1)' failed
(gnome-control-center:3522): GLib-GIO-CRITICAL **: 14:02:35.423: g_file_equal: assertion 'G_IS_FILE (file1)' failed