summaryrefslogtreecommitdiff
path: root/src/database.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/database.c')
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 1e674d7..a81feb1 100644
--- a/src/database.c
+++ b/src/database.c
@@ -608,7 +608,7 @@ int apk_repo_format_real_url(apk_blob_t *default_arch, struct apk_repository *re
r = snprintf(buf, len, BLOB_FMT, BLOB_PRINTF(uri));
}
} else {
- apk_blob_push_fmt(&uri, "/" BLOB_FMT, BLOB_PRINTF(arch));
+ while (uri.len && uri.ptr[uri.len-1] == '/') uri.len--;
if (pkg != NULL)
r = snprintf(buf, len, BLOB_FMT "/" BLOB_FMT "/" PKG_FILE_FMT,
BLOB_PRINTF(uri), BLOB_PRINTF(arch), PKG_FILE_PRINTF(pkg));