-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Find portable installs when enforcing cache limits #2856
Conversation
Sooo... |
A portable install is when you put Lines 175 to 190 in 9da096b
Lines 83 to 94 in 9da096b
|
287b836
to
47a7fd0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Problem
A user mentioned this exception with a "portable" install:
https://forum.kerbalspaceprogram.com/index.php?/topic/154922-ckan-the-comprehensive-kerbal-archive-network-v1264-orion/&do=findComment&comment=3660841
Cause
NetFileCache.EnforceSizeLimit
assumes that the current instance will be inmanager.Instances
.CKAN/Core/Net/NetFileCache.cs
Lines 294 to 298 in a162c8b
"Portable" instances are an exception to this:
CKAN/Core/KSPManager.cs
Line 66 in a162c8b
If all you have is a portable install,
manager.Instances
will be empty, andAggregate
will throw that exception.Changes
Now we use
Aggregate
's optional first parameter to set a default element based on the current instance's version criteria, which should cover portables, falling back to an empty range if not found.