diff --git a/src/libostree/ostree-repo-commit.c b/src/libostree/ostree-repo-commit.c index dc52f5e7..72961dde 100644 --- a/src/libostree/ostree-repo-commit.c +++ b/src/libostree/ostree-repo-commit.c @@ -486,12 +486,7 @@ create_regular_tmpfile_linkable_with_content (OstreeRepo *self, if (bytes_read < 0) return FALSE; else if (bytes_read == 0) - { - if (G_UNLIKELY (remaining > 0)) - return glnx_throw (error, "Unexpected EOF with %" G_GUINT64_FORMAT "/%" G_GUINT64_FORMAT " bytes remaining", remaining, length); - else - break; - } + return glnx_throw (error, "Unexpected EOF with %" G_GUINT64_FORMAT "/%" G_GUINT64_FORMAT " bytes remaining", remaining, length); if (glnx_loop_write (tmpf.fd, buf, bytes_read) < 0) return glnx_throw_errno_prefix (error, "write"); remaining -= bytes_read;