plugins: fixes path issue on Windows

When loading a plugin and setting the path, an extra backslash sneaks
when running on Windows. Fixes #9597
This commit is contained in:
Daniel Lee
2017-10-23 12:56:24 +02:00
parent 4fdb351c32
commit 7863a0417c
2 changed files with 35 additions and 1 deletions

View File

@ -40,7 +40,7 @@ func getPluginLogoUrl(pluginType, path, baseUrl string) string {
}
func (fp *FrontendPluginBase) setPathsBasedOnApp(app *AppPlugin) {
appSubPath := strings.Replace(fp.PluginDir, app.PluginDir, "", 1)
appSubPath := strings.Replace(strings.Replace(fp.PluginDir, app.PluginDir, "", 1), "\\", "/", 1)
fp.IncludedInAppId = app.Id
fp.BaseUrl = app.BaseUrl