use filepath.Join wrapper for different embed and os path styles

If using internal, "/" is used as a separator always, and with external,
filepath.Join is used.
This commit is contained in:
Harvey Tindall
2021-02-08 12:03:22 +00:00
parent 873afb47cd
commit a6a7710a79
6 changed files with 24 additions and 9 deletions

View File

@@ -77,7 +77,7 @@ func (st *Storage) loadLangSetup(filesystems ...fs.FS) error {
load := func(filesystem fs.FS, fname string) error {
index := strings.TrimSuffix(fname, filepath.Ext(fname))
lang := setupLang{}
f, err := fs.ReadFile(filesystem, filepath.Join(st.lang.SetupPath, fname))
f, err := fs.ReadFile(filesystem, FSJoin(st.lang.SetupPath, fname))
if err != nil {
return err
}