appmenus: allow '_' in filenames

This commit is contained in:
Marek Marczykowski-Górecki 2014-04-16 17:00:25 +02:00
parent 7afc15dcf0
commit 6fc4c0ae3f

View File

@ -88,8 +88,8 @@ def get_appmenus(vm):
row_no = 0
appmenus = {}
line_rx = re.compile(r"([a-zA-Z0-9.()-]+.desktop):([a-zA-Z0-9-]+(?:\[[a-zA-Z@_]+\])?)=(.*)")
ignore_rx = re.compile(r".*([a-zA-Z0-9.-]+.desktop):(#.*|\s+)$")
line_rx = re.compile(r"([a-zA-Z0-9.()-_]+.desktop):([a-zA-Z0-9-]+(?:\[[a-zA-Z@_]+\])?)=(.*)")
ignore_rx = re.compile(r".*([a-zA-Z0-9.-_]+.desktop):(#.*|\s+)$")
for untrusted_line in untrusted_appmenulist:
# Ignore blank lines and comments
if len(untrusted_line) == 0 or ignore_rx.match(untrusted_line):