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
tingping/wmclass
Alexander Larsson 2017-12-08 09:28:13 +01:00 committed by Atomic Bot
parent adc84ac4ca
commit ac38819106
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}