From 31a1bdcc05b46a6d44fe0b545eede1ecb318f734 Mon Sep 17 00:00:00 2001 From: Roddy Shuler Date: Fri, 3 Aug 2018 11:54:14 -0700 Subject: [PATCH] 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 --- src/builder-source-file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/builder-source-file.c b/src/builder-source-file.c index 8a8d3897..64cd6fa6 100644 --- a/src/builder-source-file.c +++ b/src/builder-source-file.c @@ -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;