[ostree] traverse: Require variant when traversing dirtree
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] traverse: Require variant when traversing dirtree
- Date: Wed, 23 Mar 2016 19:36:21 +0000 (UTC)
commit 7524e904b90d24929dd8b9ac975aed2b46550edf
Author: Dan Nicholson <nicholson endlessm com>
Date: Wed Mar 23 09:32:29 2016 -0700
traverse: Require variant when traversing dirtree
The dirtree object is required for traversing, so don't use the
load_variant_if_exists() function. This will return a
G_IO_ERROR_NOT_FOUND to the caller rather than trying to ref a NULL
variant in ostree_repo_commit_traverse_iter_init_dirtree() if the object
is missing.
https://bugzilla.gnome.org/show_bug.cgi?id=764091
src/libostree/ostree-repo-traverse.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/libostree/ostree-repo-traverse.c b/src/libostree/ostree-repo-traverse.c
index 85ce317..97bd102 100644
--- a/src/libostree/ostree-repo-traverse.c
+++ b/src/libostree/ostree-repo-traverse.c
@@ -377,9 +377,8 @@ traverse_dirtree (OstreeRepo *repo,
ostree_cleanup_repo_commit_traverse_iter
OstreeRepoCommitTraverseIter iter = { 0, };
- if (!ostree_repo_load_variant_if_exists (repo, OSTREE_OBJECT_TYPE_DIR_TREE,
- checksum, &dirtree,
- error))
+ if (!ostree_repo_load_variant (repo, OSTREE_OBJECT_TYPE_DIR_TREE, checksum,
+ &dirtree, error))
goto out;
if (!ostree_repo_commit_traverse_iter_init_dirtree (&iter, repo, dirtree,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]