diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-04-15 00:46:39 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-04-15 01:03:36 -0400 |
commit | 34ab33508dae4ecc9bd0b9f272fd005c0ea78b4f (patch) | |
tree | f26ca5453da5e245c22108e2d8228785d1aff13e /src/deliverable.c | |
parent | cc935245624c9c8892fd122826dda210d4dab656 (diff) | |
download | stasis-34ab33508dae4ecc9bd0b9f272fd005c0ea78b4f.tar.gz |
Apply download() error detection
Diffstat (limited to 'src/deliverable.c')
-rw-r--r-- | src/deliverable.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |