mdk-skills 2.3.24 → 2.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/web-ui/server.js +18 -2
package/package.json
CHANGED
package/scripts/web-ui/server.js
CHANGED
|
@@ -285,7 +285,15 @@ function applyProfile(profile) {
|
|
|
285
285
|
}
|
|
286
286
|
} else {
|
|
287
287
|
if (fs.existsSync(dest)) {
|
|
288
|
-
|
|
288
|
+
try {
|
|
289
|
+
fs.rmSync(dest, { recursive: true, force: true });
|
|
290
|
+
} catch (err) {
|
|
291
|
+
if (err.code === 'EBUSY') {
|
|
292
|
+
console.error(`切换场景:跳过删除 "${name}"(文件被其他程序占用)`);
|
|
293
|
+
} else {
|
|
294
|
+
console.error(`切换场景:删除 "${name}" 失败:`, err.message);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
289
297
|
}
|
|
290
298
|
}
|
|
291
299
|
}
|
|
@@ -352,7 +360,15 @@ function installSelectedSkills(selectedNames) {
|
|
|
352
360
|
}
|
|
353
361
|
} else {
|
|
354
362
|
if (fs.existsSync(dest)) {
|
|
355
|
-
|
|
363
|
+
try {
|
|
364
|
+
fs.rmSync(dest, { recursive: true, force: true });
|
|
365
|
+
} catch (err) {
|
|
366
|
+
if (err.code === 'EBUSY') {
|
|
367
|
+
console.error(`安装技能:跳过删除 "${name}"(文件被其他程序占用)`);
|
|
368
|
+
} else {
|
|
369
|
+
console.error(`安装技能:删除 "${name}" 失败:`, err.message);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
356
372
|
}
|
|
357
373
|
}
|
|
358
374
|
}
|