Fix inline "data:" URLs

Once we detect that a URL is inline text, we must not try to
actually download it.

Closes: #191
Approved by: mwleeds
auto
Roddy Shuler 2018-08-03 11:54:14 -07:00 committed by Atomic Bot
parent 4618b50395
commit 31a1bdcc05
1 changed files with 4 additions and 1 deletions

View File

@ -367,13 +367,16 @@ builder_source_file_download (BuilderSource *source,
error);
}
if (is_inline)
return TRUE;
if (is_local)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "Can't find file at %s", self->path);
return FALSE;
}
if (checksums[0] == NULL && !is_inline)
if (checksums[0] == NULL)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED, "No checksum specified for file source %s", base_name);
return FALSE;