diff --git a/src/js/core/plugin.js b/src/js/core/plugin.js index 5f392b02..8dbdef85 100644 --- a/src/js/core/plugin.js +++ b/src/js/core/plugin.js @@ -806,13 +806,17 @@ class PluginLoader { await fs.ensureDir(targetPath); const copyFiles = async (dir, baseTarget, baseSource) => { - const items = await fs.readdir(dir); + const items = await fs.readdir(dir, { withFileTypes: true }); + for (const item of items) { - const sourceFull = path.join(dir, item); + if (item.name.startsWith('.')) { + continue; + } + + const sourceFull = path.join(dir, item.name); const targetFull = path.join(baseTarget, path.relative(baseSource, sourceFull)); - const stat = await fs.stat(sourceFull); - if (stat.isDirectory()) { + if (item.isDirectory()) { await fs.ensureDir(targetFull); await copyFiles(sourceFull, baseTarget, baseSource); }