Skip to content

Commit

Permalink
Merge pull request #180 from pjf/pull/make_mod_subdirs
Browse files Browse the repository at this point in the history
Create mod subdirs when merging
  • Loading branch information
Pidgeot authored Sep 12, 2022
2 parents e738c00 + 38cf56e commit 1edbf5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions core/mods.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ def merge_folder(mod_folder, vanilla_folder, mixed_folder):
Text files are merged; other files (sprites etc) are copied over."""
status = 0
for root, _, files in os.walk(mod_folder):

# We want to make any directory in our mod folder in the mixed folder
# if it doesn't already exist. Fixes #173
mixed_dir = os.path.join(mixed_folder,
os.path.relpath(root, mod_folder))

if not os.path.isdir(mixed_dir):
os.makedirs(mixed_dir)

for k in files:
f = os.path.relpath(os.path.join(root, k), mod_folder)
log.push_prefix('file "' + f + '": ')
Expand Down
2 changes: 1 addition & 1 deletion tkgui/tkgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def show_about():
title='About', message="PyLNP "+VERSION +" - Lazy Newb Pack Python "
"Edition\n\nPort by Pidgeot\nContributions by PeridexisErrant, "
"rx80, dricus, James Morgensen, jecowa, carterscottm, McArcady, "
"fournm, rgov, cryzed\n\n"
"fournm, rgov, cryzed, pjf\n\n"
"Original program: LucasUP, TolyK/aTolyK")

@staticmethod
Expand Down

0 comments on commit 1edbf5c

Please sign in to comment.