pull: Correctly handle error state when fetching optional data
For the static deltas work, we're using the already-extant internal API to perform a HTTP fetch for optional data - static deltas are optional. Except that we didn't correctly unset the error if we were doing an optional fetch and the data wasn't found.
This commit is contained in:
parent
626fc8519b
commit
7cc4a20f3b
|
|
@ -293,11 +293,14 @@ fetch_uri_contents_membuf_sync (OtPullData *pull_data,
|
||||||
run_mainloop_monitor_fetcher (pull_data);
|
run_mainloop_monitor_fetcher (pull_data);
|
||||||
if (!fetch_data.result_stream)
|
if (!fetch_data.result_stream)
|
||||||
{
|
{
|
||||||
if (allow_noent && g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
if (allow_noent)
|
||||||
{
|
{
|
||||||
g_clear_error (error);
|
if (g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
|
||||||
ret = TRUE;
|
{
|
||||||
*out_contents = NULL;
|
g_clear_error (error);
|
||||||
|
ret = TRUE;
|
||||||
|
*out_contents = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue