Allow installing modules without download_size #2491
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
Some old modules don't have
download_size
set:https://github.com/KSP-CKAN/CKAN-meta/blob/master/Toolbar/Toolbar-1.7.9.ckan
But it's just a simple int, so that causes it to be set to 0:
CKAN/Core/Types/CkanModule.cs
Lines 256 to 257 in ab714c2
When that happens, we can't install the module because it thinks the size "should be 0":
CKAN/Core/Net/NetModuleCache.cs
Lines 117 to 120 in ab714c2
https://ci.ksp-ckan.org/job/CKAN-meta/939/console
This has blocked validation of KSP-CKAN/CKAN-meta#1356
Changes
Now we only enforce the size requirement if
download_size
is positive.