Make where-CKAN-would-install logic consistent #3931
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.
Problem
In an extremely obscure and unlikely case, you could get an error similar to this while installing a mod with CKAN if you had previously installed another mod manually:
(This exact error has a different cause, but it uses the same error message template.)
Specifically, it could happen if:
identifier-something-else.dll
, where "identifier" is the mod's identifier and "something-else" is a string indicating that it's not the real DLLidentifier.dll
Cause
Where the code to detect manually installed mods checks that the filename starts with
identifier.
with a dot, the loop over the installing files checked whether the file started with the identifier, but it didn't check what the next character was. In effect very slightly different logic was being used for the files on disk and the files being installed. This is very unlikely to cause a real problem because the identifier still has to match the file on disk, but it's still better to keep it tidy when something like this is spotted.Changes
DogeCoinPlugin
ZIP file is updated to containGameData/DogeCoinPlugin/Plugins/DogeCoinPlugin.dll
instead ofGameData/DogeCoinFlag/plugin/dogecoin.dll
DogeCoinPluginAddonFerram
ZIP file is created containingGameData/DogeCoinPlugin/Plugins/DogeCoinPlugin-Addon-Ferram.dll
so we can test the case that is fixed by the change in CoreAdding multiple reviewers based on familiarity with the issue. Since we only need one approval, don't feel obligated to look at this if you're disinclined.
(Related to KSP-CKAN/NetKAN#9856 and giuliodondi/kOS-Ferram#3 but not a fix for either one.)