Skip to content

Commit

Permalink
wmlscope: fixed a bug that caused UMC map paths to not be found
Browse files Browse the repository at this point in the history
Due to the new regex used, the tilde before UMC paths was now collected but never removed from the paths.
  • Loading branch information
Elvish-Hunter authored and GregoryLundberg committed Nov 30, 2017
1 parent 41f1ff1 commit 651aeec
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions data/tools/wesnoth/wmltools3.py
Expand Up @@ -778,8 +778,11 @@ def __init__(self, dirpath=[], exclude="", warnlevel=0, progress=False):
for pattern in split_filenames(match):
for name in expand_square_braces(pattern):
# Catches maps that look like macro names.
if (name.endswith(".map") or name.endswith(".mask")) and name[0] == '{':
name = name[1:]
if (name.endswith(".map") or name.endswith(".mask")):
if name.startswith("{~"):
name = name[2:]
elif name.startswith("{"):
name = name[1:]
if os.sep == "\\":
name = name.replace("/", "\\")
key = None
Expand Down

0 comments on commit 651aeec

Please sign in to comment.