fixed re raw string formatting

This commit is contained in:
Frank DeMarco 2020-10-30 15:29:05 -04:00
parent 6c9554a255
commit 619a7dab3f
1 changed files with 3 additions and 3 deletions

View File

@ -104,10 +104,10 @@ class Audio(Animation):
else:
for node, branches, leaves in os.walk(root, followlinks=True):
for leaf in leaves:
prefix = re.sub(r"{{}}".format(root), r"", r"{{}}".format(node))
prefix = re.sub(r"^{{}}".format(os.path.sep), r"", prefix)
prefix = re.sub(r"{}".format(root), r"", r"{}".format(node))
prefix = re.sub(r"^{}".format(os.path.sep), r"", prefix)
if prefix:
prefix = re.sub(r"{{}}".format(os.path.sep), r"_", prefix) + "_"
prefix = re.sub(r"{}".format(os.path.sep), r"_", prefix) + "_"
self.load_sfx_file(os.path.join(node, leaf,), prefix=prefix)
def load_sfx_file(self, path, name=None, replace=False, prefix="",