From ea4d2be39cb9c2e22f320d3a461605a04b9e3a3a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 2 Apr 2012 17:40:17 -0400 Subject: [PATCH] core: Return input stream for raw repositories too This bug is more obvious when fsck is rebased on top of ostree_repo_load_file(). --- src/libostree/ostree-repo.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 69e4207b..aeb7346b 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -3274,6 +3274,15 @@ ostree_repo_load_file (OstreeRepo *self, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, cancellable, error); if (!ret_file_info) goto out; + + /* Now, look for the content */ + if (g_file_info_get_file_type (ret_file_info) == G_FILE_TYPE_REGULAR + && out_input) + { + ret_input = (GInputStream*)g_file_read (content_loose_path, cancellable, error); + if (!ret_input) + goto out; + } if (out_xattrs) { ret_xattrs = ostree_get_xattrs_for_file (content_loose_path, error);