[ostree] core: While walking mtrees during commit, ensure the referenced path is resolved
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: While walking mtrees during commit, ensure the referenced path is resolved
- Date: Wed, 11 Jan 2012 18:44:13 +0000 (UTC)
commit 62821024b9b37fb576f53b83984f0b1386843fba
Author: Colin Walters <walters verbum org>
Date: Wed Jan 11 13:42:59 2012 -0500
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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 92d15f4..06fe37f 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]