Skip to content

fix: 保留恢复默认历史目录的命令,并在删除启动文件前核对权限 - #162

Merged
Ray-lea merged 2 commits into
mainfrom
codex/preserve-history-dispatch
Nov 22, 2026
Merged

Ray-lea merged 2 commits into
mainfrom
codex/preserve-history-dispatch

Conversation

@Ray-lea

@Ray-lea Ray-lea commented Nov 21, 2026 •

Copy link
Copy Markdown
Owner

改动概述

修复了在 Windows 全库检查中复现的两个问题。

  • 将 history_reset_dir 登记在原生命令源文件中。重新生成适配器后,设置页仍可恢复默认历史目录,并按所选选项移动或保留已有记录。
  • 删除启动文件前,用当前进程的权限打开目录项核对删除权限。权限不足时保留原文件并向界面返回“权限不足”。检查针对启动项本身,随后关闭句柄,由原有回收站路径处理允许的操作。

改动原因

主分支的历史目录重置入口直接写在生成文件中,生成器枚举公开命令时遗漏了该入口。现有的启动项测试则在 GitHub 的 Windows 运行器上观察到,系统拒绝了测试进程的删除访问,Shell 仍报告成功,原目录中已找不到临时文件。

验证

  • 生成后再次运行 node scripts/native-dispatch.mjs --check,90 个命令通过。历史集成测试经命令入口移动记录、恢复默认目录并核对设置与记录位置,通过。
  • 本机启动项测试通过 5 项,另 1 项使用账户回收站的测试按原设置忽略。权限测试仍要求返回 AccessDenied 且原文件存在。

Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 21, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T00:21:21.401929Z e941e0e New commits
🔒 Security Review ✅ Completed 2026-11-22T00:23:44.092108Z e941e0e New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Ray-lea added a commit to digital-bombyx/Argus that referenced this pull request Nov 22, 2026
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Ray-lea added a commit to digital-bombyx/Argus that referenced this pull request Nov 22, 2026
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Ray-lea added a commit to digital-bombyx/Argus that referenced this pull request Nov 22, 2026
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
@Ray-lea Ray-lea changed the title fix(host): 重新生成命令适配器时保留恢复默认历史目录的操作 fix: 保留恢复默认历史目录的命令,并在删除启动文件前核对权限 Nov 22, 2026
Ray-lea added a commit to digital-bombyx/Argus that referenced this pull request Nov 22, 2026
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Ray-lea added a commit to digital-bombyx/Argus that referenced this pull request Nov 22, 2026
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
Ray-lea added a commit to digital-bombyx/Argus that referenced this pull request Nov 22, 2026
Co-authored-by: bronyaicu <264752859+bronyaicu@users.noreply.github.com>
@Ray-lea
Ray-lea merged commit d89d813 into main Nov 22, 2026
7 checks passed
@Ray-lea
Ray-lea deleted the codex/preserve-history-dispatch branch November 22, 2026 00:34
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