search-locations-dialog: Stop removing non-existent folders from tracker
This change effectively reverts commit 5c679301ec
("search: Invalidate
"Search Locations" list when folders can't be found"). The crash
that commits intends to fix does not occur on main anymore, and there's
no real difference between an existing and non existing file from this
interface's perspective.
Removing a folder automatically is dangerous because it may be on
an unmounted external hard drive or another location that is not
currently available. This also removes some blocking i/o on the main
thread.
Instead replace with a subtitle message to notify the user that the
folder is inaccessible.
This commit is contained in:
parent
aae5cd27bd
commit
42920853c0
1 changed files with 1 additions and 13 deletions
|
@ -387,19 +387,7 @@ get_tracker_locations (CcSearchLocationsDialog *self)
|
|||
NULL,
|
||||
PLACE_OTHER);
|
||||
|
||||
if (file != NULL && g_file_query_exists (file, NULL))
|
||||
{
|
||||
list = g_list_prepend (list, location);
|
||||
}
|
||||
else
|
||||
{
|
||||
g_autoptr(GPtrArray) new_values = NULL;
|
||||
|
||||
new_values = place_get_new_settings_values (self, location, TRUE);
|
||||
g_settings_set_strv (self->tracker_preferences,
|
||||
TRACKER_KEY_RECURSIVE_DIRECTORIES,
|
||||
(const gchar **) new_values->pdata);
|
||||
}
|
||||
list = g_list_prepend (list, location);
|
||||
}
|
||||
|
||||
return g_list_reverse (list);
|
||||
|
|
Loading…
Add table
Reference in a new issue