[nautilus/wip/oholy/search-engine-fixes: 2/7] search-engine-recent: Do not include remote files
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/oholy/search-engine-fixes: 2/7] search-engine-recent: Do not include remote files
- Date: Tue, 15 Feb 2022 10:12:57 +0000 (UTC)
commit 89a4e768c1d19325ad8ae95f68707f66a0919379
Author: Ondrej Holy <oholy redhat com>
Date: Mon Feb 14 16:01:06 2022 +0100
search-engine-recent: Do not include remote files
The recent search engine provider also includes remote files. This
could lead to mount operations, which I think is not wanted. Let's
do not include remote files similarly to what the gvfs backend does.
Relates: https://gitlab.gnome.org/GNOME/nautilus/-/issues/2152
src/nautilus-search-engine-recent.c | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
---
diff --git a/src/nautilus-search-engine-recent.c b/src/nautilus-search-engine-recent.c
index 27d10bb82..56eef85a3 100644
--- a/src/nautilus-search-engine-recent.c
+++ b/src/nautilus-search-engine-recent.c
@@ -232,27 +232,28 @@ recent_thread_func (gpointer user_data)
NautilusSearchHit *hit;
GDateTime *modified;
GDateTime *visited;
+ g_autoptr (GError) error = NULL;
- if (gtk_recent_info_is_local (info))
+ if (!gtk_recent_info_is_local (info))
{
- g_autoptr (GError) error = NULL;
+ continue;
+ }
- if (!is_file_valid_recursive (self, file, &error))
+ if (!is_file_valid_recursive (self, file, &error))
+ {
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
{
- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
- {
- break;
- }
-
- if (error != NULL &&
- !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS))
- {
- g_debug ("Impossible to read recent file info: %s",
- error->message);
- }
+ break;
+ }
- continue;
+ if (error != NULL &&
+ !g_error_matches (error, G_IO_ERROR, G_IO_ERROR_EXISTS))
+ {
+ g_debug ("Impossible to read recent file info: %s",
+ error->message);
}
+
+ continue;
}
if (mime_types->len > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]