parse/ConfHandler: Fix multiline variable corruption
When parsing multiline variables in conf files, the last character can be accidentally removed. s2 contains new data read from the file which may or may not end with the continuation character. It makes sense to let the next loop iteration strip this if needed. We don't often use multiline expressions in .conf files which is why I'd imagine we haven't noticed this before. Most variables are quoted and its the closing quotation which often disappears. (Bitbake rev: 09a9146262d58dfe4a2ea4270026b90ae33f6c91) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
9070e745c0
commit
1df5ab5ee2
|
@ -96,7 +96,7 @@ def handle(fn, data, include):
|
|||
s = s.rstrip()
|
||||
if s[0] == '#': continue # skip comments
|
||||
while s[-1] == '\\':
|
||||
s2 = f.readline()[:-1].strip()
|
||||
s2 = f.readline().strip()
|
||||
lineno = lineno + 1
|
||||
s = s[:-1] + s2
|
||||
feeder(lineno, s, fn, statements)
|
||||
|
|
Loading…
Reference in New Issue