mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-03 02:51:17 +08:00
Make import existing side-effect free (#2429)
Co-authored-by: Xvvln <3369759202@qq.com>
This commit is contained in:
@@ -1536,19 +1536,6 @@ impl SkillService {
|
||||
// 保存到数据库
|
||||
db.save_skill(&skill)?;
|
||||
|
||||
// 同步到已启用的应用目录(创建 symlink 或复制文件)
|
||||
for app in AppType::all() {
|
||||
if skill.apps.is_enabled_for(&app) {
|
||||
if let Err(e) = Self::sync_to_app_dir(&skill.directory, &app) {
|
||||
log::warn!(
|
||||
"导入后同步 Skill '{}' 到 {:?} 失败: {e:#}",
|
||||
skill.directory,
|
||||
app
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
imported.push(skill);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user