From 62821024b9b37fb576f53b83984f0b1386843fba Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 11 Jan 2012 13:42:59 -0500 Subject: [PATCH] core: While walking mtrees during commit, ensure the referenced path is resolved This gives us a clean error instead of an assertion. --- src/libostree/ostree-repo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 92d15f4a..06fe37f2 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -1437,6 +1437,9 @@ ostree_repo_stage_directory_to_mtree (OstreeRepo *self, if (repo_dir) { + if (!ostree_repo_file_ensure_resolved (repo_dir, error)) + goto out; + ostree_mutable_tree_set_metadata_checksum (mtree, ostree_repo_file_get_checksum (repo_dir)); repo_dir_was_empty = g_hash_table_size (ostree_mutable_tree_get_files (mtree)) == 0