From ab79348af50790f494d628ead77213fad680e9e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 9 Jan 2016 23:56:39 +0100 Subject: [PATCH] feat(plugins): minor fix for external plugins with staticRoot --- pkg/plugins/frontend_plugin.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/plugins/frontend_plugin.go b/pkg/plugins/frontend_plugin.go index 1e20db1e7f5..0f0d1676066 100644 --- a/pkg/plugins/frontend_plugin.go +++ b/pkg/plugins/frontend_plugin.go @@ -3,6 +3,7 @@ package plugins import ( "net/url" "path" + "path/filepath" ) type FrontendPluginBase struct { @@ -14,7 +15,7 @@ type FrontendPluginBase struct { func (fp *FrontendPluginBase) initFrontendPlugin() { if fp.StaticRoot != "" { StaticRoutes = append(StaticRoutes, &PluginStaticRoute{ - Directory: fp.StaticRoot, + Directory: filepath.Join(fp.PluginDir, fp.StaticRoot), PluginId: fp.Id, }) } @@ -31,7 +32,7 @@ func (fp *FrontendPluginBase) handleModuleDefaults() { } if fp.StaticRoot != "" { - fp.Module = path.Join("plugins", fp.Type, fp.Id, "module") + fp.Module = path.Join("plugins", fp.Id, "module") return }