summaryrefslogtreecommitdiff
path: root/src/ostree/ot-builtin-diff.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-07-31 03:48:31 -0400
committerColin Walters <walters@verbum.org>2013-07-31 03:48:33 -0400
commit9e480cd6a97ac7d2bb6aef1f25f322d693cd8d8f (patch)
tree7fd78c756cbe4a9407fc7b193016b01703009c63 /src/ostree/ot-builtin-diff.c
parent0dec1b287cf75e3ed07859f723fc5bc0addf2acd (diff)
downloadostree-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.c12
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;