From 34ab33508dae4ecc9bd0b9f272fd005c0ea78b4f Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 15 Apr 2024 00:46:39 -0400 Subject: Apply download() error detection --- src/deliverable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/deliverable.c') diff --git a/src/deliverable.c b/src/deliverable.c index 3b004cd..1640054 100644 --- a/src/deliverable.c +++ b/src/deliverable.c @@ -1180,7 +1180,8 @@ int delivery_get_installer(struct Delivery *ctx, char *installer_url) { sprintf(script_path, "%s/%s", ctx->storage.tmpdir, installer); if (access(script_path, F_OK)) { // Script doesn't exist - if (HTTP_ERROR(download(installer_url, script_path, NULL))) { + int fetch_status = download(installer_url, script_path, NULL); + if (HTTP_ERROR(fetch_status) || fetch_status < 0) { // download failed return -1; } -- cgit