[nautilus/wip/antoniof/search-engine-fixes-42-backport: 2/7] search-engine-recent: Do not include remote files
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/search-engine-fixes-42-backport: 2/7] search-engine-recent: Do not include remote files
- Date: Sat, 5 Mar 2022 16:23:10 +0000 (UTC)
commit b6f9ad26eb2fffa529c726a31a89f39a92be2781
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.
(Backported by António Fernandes)
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 a0fd19937..48d09880f 100644
--- a/src/nautilus-search-engine-recent.c
+++ b/src/nautilus-search-engine-recent.c
@@ -233,27 +233,28 @@ recent_thread_func (gpointer user_data)
time_t modified, visited;
g_autoptr (GDateTime) gmodified = NULL;
g_autoptr (GDateTime) gvisited = NULL;
+ 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]