[ostree] core: Return input stream for raw repositories too
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] core: Return input stream for raw repositories too
- Date: Mon, 2 Apr 2012 22:34:07 +0000 (UTC)
commit ea4d2be39cb9c2e22f320d3a461605a04b9e3a3a
Author: Colin Walters <walters verbum org>
Date: Mon Apr 2 17:40:17 2012 -0400
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 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 69e4207..aeb7346 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]