From c602cd45a5e35116d44a5d778828d45f98b406bc Mon Sep 17 00:00:00 2001 From: Andrea Di Cesare Date: Wed, 7 Aug 2024 16:19:28 +0200 Subject: [PATCH] :bug: Fix PolyglotDeployer JS plugins path for new packaging with restheart-common.jar in /plugins/lib --- .../main/java/org/restheart/polyglot/PolyglotDeployer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/polyglot/src/main/java/org/restheart/polyglot/PolyglotDeployer.java b/polyglot/src/main/java/org/restheart/polyglot/PolyglotDeployer.java index c23801a7b..b71b0c3c6 100644 --- a/polyglot/src/main/java/org/restheart/polyglot/PolyglotDeployer.java +++ b/polyglot/src/main/java/org/restheart/polyglot/PolyglotDeployer.java @@ -210,11 +210,11 @@ private Path getPluginsDirectory(Map args) { } else { // this is to allow specifying the plugins directory path // relative to the jar (also working when running from classes) - var location = PluginsRegistry.class.getProtectionDomain().getCodeSource().getLocation(); + var location = PolyglotDeployer.class.getProtectionDomain().getCodeSource().getLocation(); File locationFile = new File(location.getPath()); - pluginsDir = locationFile.getParent() + File.separator + pluginsDir; + pluginsDir = locationFile.getParent(); return FileSystems.getDefault().getPath(pluginsDir); }