Added tracking for online vs local sourced mods#2071
Conversation
|
Should the local import explicitly check if |
I don't think we need to worry. Cache items would be placed in: These are tracked in
If we wanted further safety, we could check if the secondary folder name is a version number or not, but I don't think it's particularly necessary. |
a9deede to
24486d5
Compare
x753
left a comment
There was a problem hiding this comment.
Code looks sane, didn't build and test or anything though.
Tracking Online Sources
Prerequisite to identifying if package versions no longer match listed packages on Thunderstore
What's covered?
Functionality
The cache has a new untracked folder called "_state" (to mirror the profile's _state folder), which records a list of files and versions that were downloaded from an online source.
Upon download the state files are looked up and if previously in the cache (and caching is enabled), then pull from the cache and set the onlineSource property equivalent to if the state file exists.
If the file is not cached (or caching is disabled), then fetch it from Thunderstore, and write the appropriate state file to disk. Repeat the lookup as part of the previous step.
If a file is locally imported, do not write a state file.
Follow-up work for later PRs
onlineSourceenabled mod isn't in the online cache, then inform the user that it is a potentially vulnerable package