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.
Closes #51
This PR is ported from a previous PR that had feedback/comments I will sum up.
For mods not currently present on the user system, this PR works fine.
The issues are with importing mods, possibly newer versions that are already present.
The current iteration of the PR implements a backup and replace strategy:
If a file in a mod to be imported is already on disk under the same name, the files get compared and if they are not the same, the present file is moved into a timestamped backup directory and replaced by the new file.
For the most part this is expected to work fine but there are several situations in which this strategy may prove insufficient:
In order to fix these issues the import needs to be
a) keyword focused: instead of files, it needs to focus on keywords to account for changes in file extension
b) group aware: as soon as a single file of a cohesive group of files is changed, it should backup and replace the whole group with the complete new group
Taking these two into account it should be possible to guarantee that users end up with cohesive mods while also assuring that any personal customizations are not overwritten by providing the aforementioned backups.