strip file extension from generated name for non-APKs

With a generic file, the file name is the only guaranteed name metadata
field.  So if the name is not specified in the metadata, then the name
is set to the filename.  This changes that so that the file extension is
stripped from that generated name.
This commit is contained in:
Hans-Christoph Steiner 2017-06-01 10:29:30 +02:00
parent 6105f8a184
commit 372c8b418d
3 changed files with 3 additions and 3 deletions

View file

@ -843,8 +843,8 @@ def scan_repo_files(apkcache, repodir, knownapks, use_date_from_file=False):
if not usecache:
logging.debug("Processing " + name_utf8)
repo_file = collections.OrderedDict()
repo_file['name'] = os.path.splitext(name_utf8)[0]
# TODO rename apkname globally to something more generic
repo_file['name'] = name_utf8
repo_file['apkName'] = name_utf8
repo_file['hash'] = shasum
repo_file['hashType'] = 'sha256'