mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-03-28 14:13:40 +08:00
fix(skills): skip hidden directories when scanning for skills
Filter out directories starting with '.' (e.g., .system) during skill scanning to avoid exposing internal system directories from Codex.
This commit is contained in:
@@ -405,6 +405,11 @@ impl SkillService {
|
||||
|
||||
let dir_name = entry.file_name().to_string_lossy().to_string();
|
||||
|
||||
// 跳过隐藏目录(以 . 开头,如 .system)
|
||||
if dir_name.starts_with('.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 跳过已管理的
|
||||
if managed_dirs.contains(&dir_name) {
|
||||
continue;
|
||||
@@ -999,6 +1004,11 @@ pub fn migrate_skills_to_ssot(db: &Arc<Database>) -> Result<usize> {
|
||||
|
||||
let dir_name = entry.file_name().to_string_lossy().to_string();
|
||||
|
||||
// 跳过隐藏目录(以 . 开头,如 .system)
|
||||
if dir_name.starts_with('.') {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 复制到 SSOT(如果不存在)
|
||||
let ssot_path = ssot_dir.join(&dir_name);
|
||||
if !ssot_path.exists() {
|
||||
|
||||
Reference in New Issue
Block a user