mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
use stored metadatapath instead of guessing it
This commit is contained in:
parent
056a28f897
commit
cfd3e84250
2 changed files with 4 additions and 30 deletions
|
@ -474,32 +474,6 @@ def has_extension(filename, ext):
|
|||
return ext == f_ext
|
||||
|
||||
|
||||
def metadata_srclib_relpath(name):
|
||||
'''
|
||||
:param name: name of the src lib. (eg. 'HttpClient')
|
||||
:returns: relative path for requested srclib (eg. 'srclib/HttpClient.txt')
|
||||
'''
|
||||
global config
|
||||
for ext in config['accepted_formats']:
|
||||
pth = os.path.join('srclibs', name + '.' + ext)
|
||||
if os.path.isfile(pth):
|
||||
return pth
|
||||
raise FDroidException("could not find srclib metadata file for '{}'".format(name))
|
||||
|
||||
|
||||
def metadata_relpath(appid):
|
||||
'''
|
||||
:param appid: an appid. (eg. 'org.fdroid.fdroid')
|
||||
:returns: relative path for requested srclib (eg. 'metadata/org.fdroid.fdroid.txt')
|
||||
'''
|
||||
global config
|
||||
for ext in config['accepted_formats']:
|
||||
pth = os.path.join('metadata', appid + '.' + ext)
|
||||
if os.path.isfile(pth):
|
||||
return pth
|
||||
raise FDroidException("could not find metadata file for '{}'".format(appid))
|
||||
|
||||
|
||||
publish_name_regex = re.compile(r"^(.+)_([0-9]+)\.(apk|zip)$")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue