mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Auto Names: handle escaped \' and nested strings
This commit is contained in:
parent
398cebd400
commit
6adc661e0e
1 changed files with 5 additions and 4 deletions
|
@ -868,7 +868,10 @@ def retrieve_string(app_dir, string_id):
|
||||||
for line in file(xmlfile):
|
for line in file(xmlfile):
|
||||||
matches = string_search(line)
|
matches = string_search(line)
|
||||||
if matches:
|
if matches:
|
||||||
return matches.group(1)
|
s = matches.group(1)
|
||||||
|
if s.startswith('@string/'):
|
||||||
|
return retrieve_string(app_dir, s[8:]);
|
||||||
|
return s.replace("\\'","'")
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
# Retrieve the package name
|
# Retrieve the package name
|
||||||
|
@ -890,9 +893,7 @@ def fetch_real_name(app_dir):
|
||||||
|
|
||||||
if name.startswith('@string/'):
|
if name.startswith('@string/'):
|
||||||
return retrieve_string(app_dir, name[8:])
|
return retrieve_string(app_dir, name[8:])
|
||||||
|
return name
|
||||||
else:
|
|
||||||
return name
|
|
||||||
|
|
||||||
# Extract some information from the AndroidManifest.xml at the given path.
|
# Extract some information from the AndroidManifest.xml at the given path.
|
||||||
# Returns (version, vercode, package), any or all of which might be None.
|
# Returns (version, vercode, package), any or all of which might be None.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue