transaction: Fix error handling in authentication failures

We were not correctly returning in case of error, which caused
a cascading "owerwrite gerror" problem.

(cherry picked from commit 33d1d7b1a5)
This commit is contained in:
Alexander Larsson
2020-10-08 15:26:03 +02:00
committed by Alexander Larsson
parent 7df39e636d
commit 333e0518c9

View File

@@ -3262,7 +3262,7 @@ request_tokens_for_remote (FlatpakTransaction *self,
if (g_variant_lookup (results, "error-code", "i", &error_code) && error_code != -1)
{
if (error_message)
flatpak_fail_error (error, error_code, _("Failed to get tokens for ref: %s"), error_message);
return flatpak_fail_error (error, error_code, _("Failed to get tokens for ref: %s"), error_message);
else
return flatpak_fail_error (error, error_code, _("Failed to get tokens for ref"));
}