From 069e2b0ced61fc2a45937dd49acf3b0fe42a2da5 Mon Sep 17 00:00:00 2001 From: Arve Knudsen Date: Mon, 26 Oct 2020 18:31:27 +0100 Subject: [PATCH] Plugins: Fix plugin URL paths on Windows (#28548) * Plugins: Fix plugin URL paths on Windows Signed-off-by: Arve Knudsen * Plugins: Fix plugin URL paths on Windows Signed-off-by: Arve Knudsen --- pkg/plugins/frontend_plugin.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/plugins/frontend_plugin.go b/pkg/plugins/frontend_plugin.go index fa6179f6d55..89e8741507a 100644 --- a/pkg/plugins/frontend_plugin.go +++ b/pkg/plugins/frontend_plugin.go @@ -54,8 +54,8 @@ func (fp *FrontendPluginBase) setPathsBasedOnApp(app *AppPlugin) { func (fp *FrontendPluginBase) handleModuleDefaults() { if isExternalPlugin(fp.PluginDir) { - fp.Module = filepath.Join("plugins", fp.Id, "module") - fp.BaseUrl = filepath.Join("public/plugins", fp.Id) + fp.Module = path.Join("plugins", fp.Id, "module") + fp.BaseUrl = path.Join("public/plugins", fp.Id) return } @@ -66,8 +66,8 @@ func (fp *FrontendPluginBase) handleModuleDefaults() { currentDir := filepath.Base(fp.PluginDir) // use path package for the following statements // because these are not file paths - fp.Module = filepath.Join("app/plugins", fp.Type, currentDir, "module") - fp.BaseUrl = filepath.Join("public/app/plugins", fp.Type, currentDir) + fp.Module = path.Join("app/plugins", fp.Type, currentDir, "module") + fp.BaseUrl = path.Join("public/app/plugins", fp.Type, currentDir) } func isExternalPlugin(pluginDir string) bool {