Commit 204f1662 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Sometimes flatpak doesn't seem to return an error despite failing

parent 276eaa65
......@@ -705,7 +705,7 @@ public:
// With Flatpak 0.9.4 we can use flatpak_installation_update_appstream_full_sync() providing progress reporting which we don't use at this moment, but still
// better to use newer function in case the previous one gets deprecated
if (!flatpak_installation_update_appstream_full_sync(m_installation, flatpak_remote_get_name(m_remote), nullptr, nullptr, nullptr, nullptr, m_cancellable, &localError)) {
qWarning() << "Failed to refresh appstream metadata for " << flatpak_remote_get_name(m_remote) << ": " << localError->message;
qWarning() << "Failed to refresh appstream metadata for " << flatpak_remote_get_name(m_remote) << ": " << (localError ? localError->message : "<no error>");
Q_EMIT jobRefreshAppstreamMetadataFailed();
return;
}
......@@ -713,7 +713,7 @@ public:
Q_EMIT jobRefreshAppstreamMetadataFinished(m_installation, m_remote);
#else
if (!flatpak_installation_update_appstream_sync(m_installation, flatpak_remote_get_name(m_remote), nullptr, nullptr, m_cancellable, &localError)) {
qWarning() << "Failed to refresh appstream metadata for " << flatpak_remote_get_name(m_remote) << ": " << localError->message;
qWarning() << "Failed to refresh appstream metadata for " << flatpak_remote_get_name(m_remote) << ": " << (localError ? localError->message : "<no error>");
Q_EMIT jobRefreshAppstreamMetadataFailed();
return;
}
......
Markdown is supported
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