Fix matching substring flavour detection

com.github.jameshnsears.quoteunquote defines flavours 'fdroid' and
'fdroidS'. The old code used flavour in line, which matches both and the
wrong one was selected.

Closes: #912
This commit is contained in:
Jochen Sprickerhof 2021-06-12 23:59:18 +02:00
parent a21c2c5ff1
commit 0fefecde1e
4 changed files with 248 additions and 1 deletions

View file

@ -1683,7 +1683,8 @@ def parse_androidmanifests(paths, app):
if '}' in line:
inside_required_flavour -= 1
else:
if flavour and (flavour in line):
if flavour and re.match(
r'.*[\'"\s]{flavour}[\'"\s].*'.format(flavour=flavour), line):
inside_required_flavour = 1
if '{' in line: