Fix registry key-value parsing.

This commit is contained in:
daniel-j 2018-05-12 13:05:57 +02:00
parent b6b364a001
commit 3df60ef516

View file

@ -216,11 +216,11 @@ class WineRegistryKey(object):
self.add_meta(line)
elif line.startswith('"'):
try:
key, value = re.split(re.compile(r"(?<![^\\]\\\")="), line, maxsplit=1)
key, value = re.split(re.compile(r"(?<![^\\]\\\")\"="), line, maxsplit=1)
except ValueError as ex:
logger.error("Unable to parse line %s", line)
raise
key = key[1:-1]
key = key[1:]
self.subkeys[key] = value
elif line.startswith('@'):
k, v = line.split('=', 1)