diff options
author | John Hiesey <john@hiesey.com> | 2015-08-26 12:11:38 -0700 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2015-08-26 16:25:28 -0400 |
commit | 153f092d5109aa4e288d0117b0f0aa2baa78b94c (patch) | |
tree | 1f72af599bad3d856a4b80e35e51654dbea526cb | |
parent | 43d045309c7d4d72baa889ed4c474ea10f390132 (diff) | |
download | ostree-153f092d5109aa4e288d0117b0f0aa2baa78b94c.tar.gz |
static-delta: assert on non-regular files
Now that the computed similar objects are all regular files,
get_unpacked_unlinked_content should never be called on any other
object type. Assert that this is true instead of silently succeeding.
-rw-r--r-- | src/libostree/ostree-repo-static-delta-compilation.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/libostree/ostree-repo-static-delta-compilation.c b/src/libostree/ostree-repo-static-delta-compilation.c index aafe6fba..063c4088 100644 --- a/src/libostree/ostree-repo-static-delta-compilation.c +++ b/src/libostree/ostree-repo-static-delta-compilation.c @@ -474,11 +474,7 @@ get_unpacked_unlinked_content (OstreeRepo *repo, cancellable, error)) goto out; - if (g_file_info_get_file_type (ret_finfo) != G_FILE_TYPE_REGULAR) - { - ret = TRUE; - goto out; - } + g_assert (g_file_info_get_file_type (ret_finfo) == G_FILE_TYPE_REGULAR); out = g_unix_output_stream_new (fd, FALSE); if (g_output_stream_splice (out, istream, G_OUTPUT_STREAM_SPLICE_CLOSE_TARGET, @@ -571,13 +567,6 @@ try_content_rollsum (OstreeRepo *repo, cancellable, error)) goto out; - /* Only try to rollsum regular files obviously */ - if (!(tmp_from && tmp_to)) - { - ret = TRUE; - goto out; - } - matches = _ostree_compute_rollsum_matches (tmp_from, tmp_to); { guint match_ratio = (matches->bufmatches*100)/matches->total; |