mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-12-05 17:19:27 +08:00
检查与 mv 之间若目标被别的程序建出,mv 会把临时目录移进去且返回成功。 改名后确认 <目标>/SKILL.md 存在、<目标>/<临时目录名> 不存在,嵌进去时移回 再按重名规则处理;Linux 可用 mv -T。Windows 只用 Rename-Item(目标已存在时 报错),不用 Move-Item 发布。重算 source_hash。 If the target appears between the check and mv, mv nests the temporary directory and still succeeds. After renaming, confirm <target>/SKILL.md exists and <target>/<temporary name> does not; move it back and apply the conflict rules if nested. Windows publishes with Rename-Item only. source_hash recomputed.