aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/artifactory.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/artifactory.c b/src/artifactory.c
index c44c95f..0c73b69 100644
--- a/src/artifactory.c
+++ b/src/artifactory.c
@@ -57,9 +57,11 @@ int artifactory_download_cli(char *dest,
fprintf(stderr, "%s: %s: %s", __FUNCTION__, path, strerror(errno));
return -1;
}
+
sprintf(path + strlen(path), "/%s", remote_filename);
- if (download(url, path)) {
+ if (HTTP_ERROR(download(url, path, NULL))) {
fprintf(stderr, "%s: download failed: %s\n", __FUNCTION__, url);
+ return -1;
}
chmod(path, 0755);
return 0;