Commit 125b731a authored by Krzesimir Nowak's avatar Krzesimir Nowak Committed by Christian Hergert
Browse files

flatpak: Gracefully handle download errors

We should return the error immediately if downloading the archive
failed. Also, we shouldn't try to open a flatpak project if download
failed.

https://bugzilla.gnome.org/show_bug.cgi?id=779802
parent b9c6bc15
......@@ -278,6 +278,9 @@ gbp_flatpak_clone_widget_worker_completed (GTask *task,
"fraction", 1.0,
NULL);
if (g_task_had_error (task))
return;
/* Wait for a second so animations can complete before opening
* the project. Otherwise, it's pretty jarring to the user.
*/
......@@ -393,6 +396,11 @@ gbp_flatpak_clone_widget_worker (GTask *task,
req->destination,
self->strip_components,
&error);
if (error != NULL)
{
g_task_return_error (task, error);
return;
}
}
for (i = 0; req->src->patches[i]; i++)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment