diff options
author | Colin Walters <walters@verbum.org> | 2013-07-31 03:48:31 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-07-31 03:48:33 -0400 |
commit | 9e480cd6a97ac7d2bb6aef1f25f322d693cd8d8f (patch) | |
tree | 7fd78c756cbe4a9407fc7b193016b01703009c63 /src/ostree/ot-builtin-diff.c | |
parent | 0dec1b287cf75e3ed07859f723fc5bc0addf2acd (diff) | |
download | ostree-9e480cd6a97ac7d2bb6aef1f25f322d693cd8d8f.tar.gz |
core: Finish making object path API private
This allows us to more easily change the internals later.
Diffstat (limited to 'src/ostree/ot-builtin-diff.c')
-rw-r--r-- | src/ostree/ot-builtin-diff.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/ostree/ot-builtin-diff.c b/src/ostree/ot-builtin-diff.c index e335194c..7abe071f 100644 --- a/src/ostree/ot-builtin-diff.c +++ b/src/ostree/ot-builtin-diff.c @@ -100,17 +100,13 @@ object_set_total_size (OstreeRepo *repo, GVariant *v = key; const char *csum; OstreeObjectType objtype; - gs_unref_object GFile *objpath = NULL; - gs_unref_object GFileInfo *finfo = NULL; + guint64 size; ostree_object_name_deserialize (v, &csum, &objtype); - objpath = ostree_repo_get_object_path (repo, csum, objtype); - finfo = g_file_query_info (objpath, OSTREE_GIO_FAST_QUERYINFO, G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, - cancellable, error); - if (!finfo) + if (!ostree_repo_query_object_storage_size (repo, objtype, csum, &size, + cancellable, error)) goto out; - - *out_total += g_file_info_get_size (finfo); + *out_total += size; } ret = TRUE; |