From 59d7db73f18dc8d838d5ee14c13fb20c05e50fd1 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Wed, 20 May 2026 18:13:41 +0200 Subject: [PATCH] redo thing --- server/plugins.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/plugins.js b/server/plugins.js index ea5b297..ed9b077 100644 --- a/server/plugins.js +++ b/server/plugins.js @@ -26,10 +26,11 @@ function parsePluginConfig(filePath) { const destinationDir = path.join(__dirname, '../web/js/plugins', path.dirname(pluginConfig.frontEndPath)); // Check if the source path exists - if (!fs.existsSync(sourcePath)) { - console.error(`Error: source path ${sourcePath} does not exist.`); - return pluginConfig; - } + const destinationDir = path.join( + __dirname, + '../web/js/plugins', + path.relative(pluginsDir, path.dirname(sourcePath)) + ); // Check if the destination directory exists, if not, create it if (!fs.existsSync(destinationDir)) fs.mkdirSync(destinationDir, { recursive: true }); // Create directory recursively