From 84b6617faf71b78c0ccd1c51b0ec53cb5b1c4aad Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sat, 1 May 2021 09:46:24 +0200 Subject: [PATCH] Don't return Gradle variables as string This is used in checkupdates and currently sets the AutoName to something like ${displayName}: https://gitlab.com/fdroid/fdroiddata/-/commit/4ae415f73c7e70ca41139746c1425c1d59d7d4a5 --- fdroidserver/common.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 86cc6403..df884b6d 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1425,7 +1425,11 @@ def unescape_string(string): def retrieve_string(app_dir, string, xmlfiles=None): - if not string.startswith('@string/'): + if string.startswith('@string/'): + name = string[len('@string/'):] + elif string.startswith('${'): + return '' # Gradle variable + else: return unescape_string(string) if xmlfiles is None: @@ -1438,8 +1442,6 @@ def retrieve_string(app_dir, string, xmlfiles=None): if os.path.basename(root) == 'values': xmlfiles += [os.path.join(root, x) for x in files if x.endswith('.xml')] - name = string[len('@string/'):] - def element_content(element): if element.text is None: return ""