diff --git a/app/flatpak-transaction.c b/app/flatpak-transaction.c index f05b31a1..46547b92 100644 --- a/app/flatpak-transaction.c +++ b/app/flatpak-transaction.c @@ -478,13 +478,15 @@ flatpak_transaction_add_ref (FlatpakTransaction *self, } } - if (metadata == NULL && remote != NULL && - flatpak_dir_fetch_ref_cache (self->dir, remote, ref, NULL, NULL, &remote_metadata, NULL, &local_error)) - metadata = remote_metadata; - else + if (metadata == NULL && remote != NULL) { - g_print ("Warning: Can't find dependencies: %s\n", local_error->message); - g_clear_error (&local_error); + if (flatpak_dir_fetch_ref_cache (self->dir, remote, ref, NULL, NULL, &remote_metadata, NULL, &local_error)) + metadata = remote_metadata; + else + { + g_print ("Warning: Can't find dependencies: %s\n", local_error->message); + g_clear_error (&local_error); + } } if (metadata)