Repository navigation
Conversation
CachedFolder 按资源类型缓存「上次下载的文件夹」,读取时未做加载器/版本适用性校验。 用户不切换所选版本、交替下载 Forge 与 NeoForge 的 Mod 时,后一个下载会沿用 前一个版本文件夹的默认位置,Mod 落进错误的版本(Meloong-Git#9536)。 改为在使用缓存前校验其仍位于当前适合的版本目录下,否则弃用缓存并回退到 原有的「当前版本 / 自动挑选适合版本」逻辑;同版本连续下载的便利性保持不变。 Fixes Meloong-Git#9536
This comment was marked as low quality.
This comment was marked as low quality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
问题
#9536:下载 Forge 模组时偶尔被错误导向 NeoForge 版本文件夹(反之亦然)。复现方式:同一
.minecraft下同时存在 Forge 与 NeoForge 的版本文件夹,交替下载两种加载器的 Mod。原因
PageDownloadCompDetail.xaml.vb在选择默认下载位置时,优先使用CachedFolder(按ResourceTypes做键的「上次下载文件夹」缓存):注意
ElseIf分支有IsInstanceSuitable检查,但缓存分支没有。用户不切换所选版本、交替下载 Forge 与 NeoForge 的 Mod 时,后一个下载会沿用前一个的版本文件夹作为默认位置。(切换所选版本时 setter 会清缓存,所以只有不切版本的交错下载会中招。)
issue 附件 Log5.txt 中的对应日志:
修复
在使用缓存前校验其仍位于当前适合的版本目录下,否则弃用缓存并回退到原有逻辑:
同版本连续下载的便利性不受影响;选中版本不适配时的「自动挑选适合版本」逻辑也原样保留。
编译验证
Microsoft.NETFramework.ReferenceAssemblies1.0.3,net48-windows+ WPF,以 SDK 风格壳工程复用原 vbproj 的全部 ItemGroup 编译(XAML 参与 MarkupCompile)。main:0 错误 / 650 警告;本分支:0 错误 / 650 警告(均为仓库原有BC42017,无新增)。说明