Catch nested GameData folders in Netkan #2948
Merged
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.
Motivation
#2788 created Netkan validation checks based on the legacy Perl bot and the pull request validation scripts. There's one remaining check that isn't migrated yet:
https://github.com/KSP-CKAN/xKAN-meta_testing/blob/73cd8a319ae8833e40b52b49976afe49d00db30b/NetKAN/build.sh#L455-L462
In KSP-CKAN/NetKAN#7587 we discovered that MoreHabPlanets' current latest version was blocked by this check. Presumably it was fine when first indexed, then the format of the ZIP changed later. This could have been caught by the bot as soon as that release was inflated if this check was in Netkan.
Changes
Now the
InstallsFilesValidator
looks for multiple occurrences of GameData in a mod's files' installation paths and throws an exception if found. This will allow us to adjust metadata to fix this problem before such modules are indexed.