fix(mod_custom): use absolute smartfs entry.path instead of joining with dirPath when building fullPath

This commit is contained in:
2026-03-05 16:47:47 +00:00
parent 9cf173293d
commit ecfd7600e2
3 changed files with 9 additions and 2 deletions

View File

@@ -176,7 +176,8 @@ export class CustomBundleHandler {
for (const entry of entries) {
if (!entry.isDirectory && regex.test(entry.name)) {
const fullPath = plugins.path.join(dirPath, entry.path);
// entry.path is already absolute from smartfs
const fullPath = entry.path;
const relativePath = plugins.path.relative(this.cwd, fullPath);
const destPath = plugins.path.join(outputDir, plugins.path.basename(entry.path));
await plugins.fs.directory(plugins.path.dirname(destPath)).create();