plugin: fix path for app plugins on windows

This fixes when an app that contains a plugin (which means it has
a filepath with more parts) gets a back slash in the path for the
plugin module. The string replace now replaces all back slashes and
not just the first one.
This commit is contained in:
Daniel Lee
2018-01-03 22:07:38 +01:00
parent 27835f373e
commit ccf1a5124b
2 changed files with 3 additions and 3 deletions

View File

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