Skip to content

Commit 38cf56e

Browse files
committed
Create mod subdirs when merging
When walking the list of files to merge from a mod, also try to create any subdirectories those files may be in. Closes #173
1 parent e738c00 commit 38cf56e

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

core/mods.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,15 @@ def merge_folder(mod_folder, vanilla_folder, mixed_folder):
197197
Text files are merged; other files (sprites etc) are copied over."""
198198
status = 0
199199
for root, _, files in os.walk(mod_folder):
200+
201+
# We want to make any directory in our mod folder in the mixed folder
202+
# if it doesn't already exist. Fixes #173
203+
mixed_dir = os.path.join(mixed_folder,
204+
os.path.relpath(root, mod_folder))
205+
206+
if not os.path.isdir(mixed_dir):
207+
os.makedirs(mixed_dir)
208+
200209
for k in files:
201210
f = os.path.relpath(os.path.join(root, k), mod_folder)
202211
log.push_prefix('file "' + f + '": ')

tkgui/tkgui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def show_about():
580580
title='About', message="PyLNP "+VERSION +" - Lazy Newb Pack Python "
581581
"Edition\n\nPort by Pidgeot\nContributions by PeridexisErrant, "
582582
"rx80, dricus, James Morgensen, jecowa, carterscottm, McArcady, "
583-
"fournm, rgov, cryzed\n\n"
583+
"fournm, rgov, cryzed, pjf\n\n"
584584
"Original program: LucasUP, TolyK/aTolyK")
585585

586586
@staticmethod

0 commit comments

Comments
 (0)