Plugins: Compose filesystem paths with filepath.Join (#28375)

* plugins: Fix filesystem path composition

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* plugins: Use filepath.Join to join filesystem paths

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
Arve Knudsen
2020-10-19 17:35:31 +02:00
committed by GitHub
parent 762a7195a6
commit 89d10c706a
8 changed files with 16 additions and 17 deletions

View File

@ -2,7 +2,7 @@ package plugins
import (
"encoding/json"
"path"
"path/filepath"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/models"
@ -45,7 +45,7 @@ func (p *DataSourcePlugin) Load(decoder *json.Decoder, base *PluginBase, backend
if p.Backend {
cmd := ComposePluginStartCommand(p.Executable)
fullpath := path.Join(p.PluginDir, cmd)
fullpath := filepath.Join(p.PluginDir, cmd)
factory := grpcplugin.NewBackendPlugin(p.Id, fullpath, grpcplugin.PluginStartFuncs{
OnLegacyStart: p.onLegacyPluginStart,
OnStart: p.onPluginStart,