db: fix apkindex path generation

remove the left over apk_blob_push_fmt() call that corrupted uri and
trim the path end from trailing slashes to get original functionality.

fixes commit be4ce407 "support new index format without attaching arch"
cute-signatures
Timo Teräs 2022-02-22 13:56:06 +02:00
parent fedaa44546
commit 3a194ea5d7
1 changed files with 1 additions and 1 deletions

View File

@ -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));