Skip to content

Bootstrap custom APL directory - #3

Merged
Korlne merged 1 commit into
mainfrom
fix/apl-custom-path-bootstrap
Jul 5, 2026
Merged

Korlne merged 1 commit into
mainfrom
fix/apl-custom-path-bootstrap

Conversation

@Korlne

@Korlne Korlne commented Jul 5, 2026

Copy link
Copy Markdown
Owner

概要

这个 PR 修复 fresh clone 后第一次打开 APL 选择时出现的 ./zsim/data/APLData/custom 路径不存在提示。

原因是 Git 不会保存空目录,而 custom APL 目录默认没有内容;重新从 GitHub 拉下项目后该目录不存在。WebUI 的 APL 档案初始化会扫描默认 APL 目录和 custom APL 目录,扫描到不存在的 custom 目录时就会向用户显示路径警告。

变更

  • 在 APLArchive.refresh() 中确保 custom APL 目录存在
  • 添加 zsim/data/APLData/custom/.gitkeep,让 clean checkout 后目录本身存在
  • 在 .gitignore 中继续忽略用户自定义 APL 文件,但保留 .gitkeep
  • 添加首启场景回归测试,覆盖 custom 目录缺失时的初始化行为

验证

  • 回归测试:tests/test_apl_archive_bootstrap.py 通过
  • 完整后端测试:823 passed, 5 skipped

Ensure the WebUI APL archive creates the custom APL directory on first use and keep the empty directory present in clean GitHub checkouts.
@Korlne
Korlne merged commit e33d296 into main Jul 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant