Skip to content

单项部署在源与目标重叠时删除源 Mod / Reject overlapping paths before a single Mod toggle #105

Closed

Description

@uyujkk

审查版本 / Reviewed build

2026-11-05,Windows 11 25H2 x64(26200.9711)。基于 GitHub main 的 1319748。以下结果来自该提交运行文件与 G 盘隔离合成数据。

问题与影响 / Problem and impact

单项部署按 目标目录/Mod名称 是否存在决定部署或移除。目标目录设为该 Mod 所在的角色目录时,算出的部署目标等于源 Mod 自身。双击 Mod 后程序进入移除分支,删除源目录。

建议优先级 P1。事务备份提供了恢复机会,但重叠路径应在任何破坏性操作前被拒绝。组合预设已有源、目标分离检查,单项入口缺少相同保护。

复现步骤 / Reproduction steps

  1. 准备一次性仓库 Repository/TestCharacter/TestModA,放入 mod.ini 和一个哨兵文件。
  2. 将该仓库的加载器目标目录设为 Repository/TestCharacter,使用复制模式。
  3. 打开 Mod 管理,选中 TestCharacter,双击 TestModA。
  4. 检查源目录和程序状态。

实测 / Observed result

使用真实程序及 FlaUI 从上述双击入口复现。源目录被删除,程序继续运行。复现用测试名为 Reproduce_SingleToggleCanRemoveItsOwnSource。

source existed before=True
source exists after=False
app running=True

备份链路会在删除前执行,因此这项记录的影响是源目录被意外移除及需要恢复。测试没有据此认定全部数据不可恢复。

预期与验收 / Expected behavior and acceptance

  • 单项部署、移除及其双击、按钮和键盘入口共用源、目标分离检查。
  • 目标等于源,或源、目标目录相互包含时,在备份、复制和删除前停止,并提示具体路径。
  • 覆盖本例,以及源、目标完全相同、正常分离目录和相关目录联接场景。
  • 被拒绝后源文件、部署目录和现有备份保持完整。

单项路径与存在性判定 · 备份后执行删除 · 组合预设已有的分离检查

English summary

A single-Mod toggle treats an existing destination as a removal. If the configured target is the selected Mod's character folder, the computed destination is the source itself. A real UI test confirmed that double-clicking removes that source directory while the app keeps running. Reject overlapping roots before destructive work and apply the check to every single-Mod entry point.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions