From 0fb3645fedf3596360af1542038109a3f7fa2e6d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 5 Dec 2016 20:56:55 -0500 Subject: [PATCH] pull: Write .commitpartial for local pulls first too This is what we do for non-local (i.e. HTTP) pulls; we wnat to correctly handle being interrupted during partial pulls. Closes: https://github.com/ostreedev/ostree/issues/579 Closes: #613 Approved by: jlebon --- src/libostree/ostree-repo-pull.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libostree/ostree-repo-pull.c b/src/libostree/ostree-repo-pull.c index 80c70438..47da6846 100644 --- a/src/libostree/ostree-repo-pull.c +++ b/src/libostree/ostree-repo-pull.c @@ -1273,15 +1273,15 @@ scan_one_metadata_object_c (OtPullData *pull_data, { if (!is_stored) { - if (!ostree_repo_import_object_from_with_trust (pull_data->repo, pull_data->remote_repo_local, - objtype, tmp_checksum, !pull_data->is_untrusted, - cancellable, error)) - goto out; if (objtype == OSTREE_OBJECT_TYPE_COMMIT) { if (!write_commitpartial_for (pull_data, tmp_checksum, error)) goto out; } + if (!ostree_repo_import_object_from_with_trust (pull_data->repo, pull_data->remote_repo_local, + objtype, tmp_checksum, !pull_data->is_untrusted, + cancellable, error)) + goto out; } is_stored = TRUE; is_requested = TRUE;