[gnome-software/mwleeds/fix-deprecated-install: 2/4] gs-plugin-loader: Set file for URL_TO_APP actions
- From: Phaedrus Leeds <mwleeds src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/mwleeds/fix-deprecated-install: 2/4] gs-plugin-loader: Set file for URL_TO_APP actions
- Date: Tue, 30 Nov 2021 05:26:03 +0000 (UTC)
commit 79f43614921bc51ed8321a0bbbad7c4999bf9816
Author: Phaedrus Leeds <mwleeds protonmail com>
Date: Mon Nov 29 17:47:54 2021 -0800
gs-plugin-loader: Set file for URL_TO_APP actions
This mirrors what is done for FILE_TO_APP actions lower down in the same
function, since this is another codepath where such actions are
executed.
(This is Milan's patch)
lib/gs-plugin-loader.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 0bdded7d1..c5d7ef4f8 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3356,8 +3356,15 @@ gs_plugin_loader_process_thread_cb (GTask *task,
gs_plugin_job_set_action (helper->plugin_job, GS_PLUGIN_ACTION_FILE_TO_APP);
gs_plugin_job_set_file (helper->plugin_job, file);
helper->function_name = gs_plugin_action_to_function_name
(GS_PLUGIN_ACTION_FILE_TO_APP);
- if (!gs_plugin_loader_run_results (helper, cancellable, &local_error))
+ if (gs_plugin_loader_run_results (helper, cancellable, &local_error)) {
+ for (guint j = 0; j < gs_app_list_length (list); j++) {
+ GsApp *app = gs_app_list_index (list, j);
+ if (gs_app_get_local_file (app) == NULL)
+ gs_app_set_local_file (app, gs_plugin_job_get_file
(helper->plugin_job));
+ }
+ } else {
g_debug ("Failed to convert file:// URI to app using file-to-app
action: %s", local_error->message);
+ }
gs_plugin_job_set_action (helper->plugin_job, GS_PLUGIN_ACTION_URL_TO_APP);
gs_plugin_job_set_file (helper->plugin_job, NULL);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]