Create mod subdirs when merging#180
Merged
Pidgeot merged 1 commit intoPidgeot:masterfrom Sep 12, 2022
Merged
Conversation
Owner
|
I haven't officially dropped Python 2 compatibility at this point, and it doesn't have exist_ok - so please follow the pattern seen elsewhere in the file: if not os.path.isdir(mixed_dir):
os.makedirs(mixed_dir)Feel free to also add yourself to the contributor list in tkgui/tkgui.py. |
Contributor
Author
Shall do, even though the Python Software Foundation has asked that Python 2 lives on in our hearts and memories, but not our codebases.
♥ |
When walking the list of files to merge from a mod, also try to create any subdirectories those files may be in. Closes Pidgeot#173
0ac942c to
38cf56e
Compare
Contributor
Author
|
Requested changes made and branch updated. Thank you!! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When walking the list of files to merge from a mod, also try to create any subdirectories those files may be in.
Testing
Used PyLNP to install the HighFantasty mod. Without this change, an error is logged that files cannot be copied. With this change, the files copy across fine, and the merged changes can be applied.
Launched a game with the merged changes applied. Created a world. Started a fortress mode game, and observed that HighFantasty civs like dark gnomes and lizardfolk were active in the world.
This doesn't mean that HighFantasy installs flawlessly (it doesn't), but it no longer errors out from failing to copy files.
Other information
Thank you so much for PyLNP! It rocks!!
Closes #173