mirror of
https://github.com/f-droid/fdroidserver.git
synced 2026-05-24 16:55:17 -04:00
update: allow repo files to use _ in the file names
_ is a valid character for Java package names, so it should also work in the repo file naming scheme. This makes it so it only splits the file name based on the last _.
This commit is contained in:
@@ -849,12 +849,13 @@ def scan_repo_files(apkcache, repodir, knownapks, use_date_from_file=False):
|
||||
repo_file['versionName'] = shasum
|
||||
# the static ID is the SHA256 unless it is set in the metadata
|
||||
repo_file['packageName'] = shasum
|
||||
n = name_utf8.split('_')
|
||||
|
||||
n = name_utf8.rsplit('_', maxsplit=1)
|
||||
if len(n) == 2:
|
||||
packageName = n[0]
|
||||
versionCode = n[1].split('.')[0]
|
||||
if re.match('^-?[0-9]+$', versionCode) \
|
||||
and common.is_valid_package_name(name_utf8.split('_')[0]):
|
||||
and common.is_valid_package_name(n[0]):
|
||||
repo_file['packageName'] = packageName
|
||||
repo_file['versionCode'] = int(versionCode)
|
||||
srcfilename = name + b'_src.tar.gz'
|
||||
|
||||
Reference in New Issue
Block a user