From d95a65e2b4194278dfef226c449a1ee00c716961 Mon Sep 17 00:00:00 2001 From: Manny Date: Sun, 26 Dec 2021 16:46:17 -0500 Subject: [PATCH] nautilus-files-view: Add compressed archives to Recent files Archives created with "Compress..." are not added to the Recent files list. The recently created compressed archive is not found in the Recent list. This patch adds the newly compressed archive resource to the Recent files list. Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2052 --- src/nautilus-files-view.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index 629411e556..63b26fb582 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -2146,6 +2146,7 @@ compress_done (GFile *new_file, NautilusFilesView *view; NautilusFilesViewPrivate *priv; NautilusFile *file; + char *uri = NULL; data = user_data; view = data->view; @@ -2181,6 +2182,9 @@ compress_done (GFile *new_file, GUINT_TO_POINTER (TRUE)); } + uri = nautilus_file_get_uri (file); + gtk_recent_manager_add_item (gtk_recent_manager_get_default (), uri); + nautilus_file_unref (file); out: g_hash_table_destroy (data->added_locations); @@ -2191,6 +2195,7 @@ out: (gpointer *) &data->view); } + g_free (uri); g_free (data); } -- GitLab