aboutsummaryrefslogtreecommitdiffstats
path: root/src/fetch.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fetch.c')
-rw-r--r--src/fetch.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/fetch.c b/src/fetch.c
index 09e3b9d3ec..72b481df7e 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -120,9 +120,7 @@ static int fetch_package(struct fetch_ctx *fctx,
if (apk_flags & APK_SIMULATE)
return 0;
- snprintf(url, sizeof(url), "%s%s%s", repo->url,
- repo->url[strlen(repo->url)-1] == '/' ? "" : "/",
- pkgfile);
+ apk_repo_format_filename(url, sizeof(url), repo->url, pkg->arch, pkgfile);
if (fctx->flags & FETCH_STDOUT) {
fd = STDOUT_FILENO;