mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
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:
2
setup.go
2
setup.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user