Skip to content

Commit 433628c

Browse files
Fix loading Unicode paths from 2.4 (#3624)
1 parent 65e26c6 commit 433628c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/classes/json_data.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from classes.app import get_app
4040

4141
# Compiled path regex
42-
path_regex = re.compile(r'"(image|path)"\s*:\s*"(.*?)"')
42+
path_regex = re.compile(r'"(image|path)"\s*:\s*(".*?")')
4343
path_context = {}
4444

4545

@@ -217,7 +217,7 @@ def write_to_file(self, file_path, data, path_mode="ignore", previous_path=None)
217217
def replace_string_to_absolute(self, match):
218218
"""Replace matched string for converting paths to relative paths"""
219219
key = match.groups(0)[0]
220-
path = match.groups(0)[1]
220+
path = json.loads(match.groups(0)[1])
221221

222222
# Find absolute path of file (if needed)
223223
if "@transitions" in path:

0 commit comments

Comments
 (0)