1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

update: fix setting current_version_file for make_current_version_link

Before, it would never set current_version_file to the current APK since it
first set current_version_code, then tested against CurrentVersionCode. So
if there is only a single APK and its the CurrentVersionCode, then
current_version_file would not get set.

refs #772
This commit is contained in:
Hans-Christoph Steiner 2021-01-14 14:43:37 +01:00
parent 0a1793ab7f
commit c7fcfe3bfa

View File

@ -466,10 +466,10 @@ def make_v0(apps, apks, repodir, repodict, requestsdict, fdroid_signing_key_fing
for apk in apklist:
file_extension = common.get_file_extension(apk['apkName'])
# find the APK for the "Current Version"
if current_version_code < apk['versionCode']:
current_version_code = apk['versionCode']
if current_version_code < int(app.CurrentVersionCode):
current_version_file = apk['apkName']
if current_version_code < apk['versionCode']:
current_version_code = apk['versionCode']
apkel = doc.createElement("package")
apel.appendChild(apkel)