fix: implement skill synchronization to enabled application directories#1934
fix: implement skill synchronization to enabled application directories#1934buddydeus wants to merge 2 commits intofarion1231:mainfrom
Conversation
Add functionality to sync imported skills to application directories based on user configuration (symlink/copy). Enhance Windows symlink creation with fallback to junctions for better compatibility. Update path removal logic to support both symlinks and junctions, ensuring safe deletion without affecting source files.
|
@codex review |
Made-with: Cursor
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 88059d1259
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const FILE_ATTRIBUTE_REPARSE_POINT: u32 = 0x400; | ||
| return path | ||
| .symlink_metadata() | ||
| .map(|m| m.file_attributes() & FILE_ATTRIBUTE_REPARSE_POINT != 0) | ||
| .unwrap_or(false); |
There was a problem hiding this comment.
Restrict reparse-point detection to link tags
is_symlink now treats any FILE_ATTRIBUTE_REPARSE_POINT as a symlink/junction, but that flag is also set on non-link reparse types (for example cloud placeholder directories). In those environments, remove_path will take the symlink branch and call fs::remove_dir instead of recursive deletion, which can fail on non-empty directories and break sync/remove flows on Windows. Please narrow this check to actual link-like reparse tags (symlink/mount-point) rather than all reparse points.
Useful? React with 👍 / 👎.
Add functionality to sync imported skills to application directories based on user configuration (symlink/copy). Enhance Windows symlink creation with fallback to junctions for better compatibility. Update path removal logic to support both symlinks and junctions, ensuring safe deletion without affecting source files.
Summary / 概述
Related Issue / 关联 Issue
Fixes #
Screenshots / 截图
Checklist / 检查清单
pnpm typecheckpasses / 通过 TypeScript 类型检查pnpm format:checkpasses / 通过代码格式检查cargo clippypasses (if Rust code changed) / 通过 Clippy 检查(如修改了 Rust 代码)