[ostree] pull: Correctly handle error state when fetching optional data
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] pull: Correctly handle error state when fetching optional data
- Date: Tue, 29 Apr 2014 15:52:23 +0000 (UTC)
commit 7cc4a20f3bb7a02ac3c1e2d9ef1ed0c9fa49b2f6
Author: Colin Walters <walters verbum org>
Date: Tue Apr 29 09:02:43 2014 -0400
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.
src/libostree/ostree-repo-pull.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c
index 0d9eaf8..427bd92 100644
--- a/src/libostree/ostree-repo-pull.c
+++ b/src/libostree/ostree-repo-pull.c
@@ -293,11 +293,14 @@ fetch_uri_contents_membuf_sync (OtPullData *pull_data,
run_mainloop_monitor_fetcher (pull_data);
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);
- ret = TRUE;
- *out_contents = NULL;
+ if (g_error_matches (*error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))
+ {
+ g_clear_error (error);
+ ret = TRUE;
+ *out_contents = NULL;
+ }
}
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]