From ac38819106eb039252f0ae45f709896beac70545 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 8 Dec 2017 09:28:13 +0100 Subject: [PATCH] Fix file sources that have no sha256 checksums (but have others) This was missing from the previous commit, and makes file sources work just like archive sources. Closes: #78 Approved by: pwithnall --- src/builder-source-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builder-source-file.c b/src/builder-source-file.c index 8c22e93a..7b3c49bb 100644 --- a/src/builder-source-file.c +++ b/src/builder-source-file.c @@ -370,9 +370,9 @@ builder_source_file_download (BuilderSource *source, return FALSE; } - if ((self->sha256 == NULL || *self->sha256 == 0) && !is_inline) + if (checksums[0] == NULL) { - g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Sha256 not specified"); + g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "No checksum specified for file source %s", base_name); return FALSE; }