Skip to content

Commit

Permalink
Fix #667: monster bulk export: Replace Window-unfriendly characters w…
Browse files Browse the repository at this point in the history
…ith _
  • Loading branch information
theCapypara committed Nov 22, 2023
1 parent 64e1407 commit 75109d4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion skytemple/module/monster/controller/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,12 @@ async def export():
idle_anim2,
)

safe_name = main_name
for c in r'<>:"/\|?*':
safe_name = safe_name.replace(c, "_")

fn = os.path.join(
directory, f"{entry.md_index:04}_{main_name}.xml"
directory, f"{entry.md_index:04}_{safe_name}.xml"
)

with open_utf8(fn, "w") as file:
Expand Down

0 comments on commit 75109d4

Please sign in to comment.