mirror of
https://github.com/ostreedev/ostree.git
synced 2025-02-03 17:47:40 +03:00
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
This commit is contained in:
parent
7232b2940b
commit
7524e904b9
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user