forked from mystiq/dex
using path.Join replace filepath.Join
Signed-off-by: copperyp <copperyp@gmail.com>
This commit is contained in:
parent
a1c1076137
commit
5854dd192d
1 changed files with 2 additions and 3 deletions
|
@ -8,7 +8,6 @@ import (
|
|||
"net/http"
|
||||
"net/url"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
|
@ -109,7 +108,7 @@ func loadWebConfig(c webConfig) (http.Handler, http.Handler, *templates, error)
|
|||
if err != nil {
|
||||
return nil, nil, nil, fmt.Errorf("read static dir: %v", err)
|
||||
}
|
||||
themeFiles, err := fs.Sub(c.webFS, filepath.ToSlash(filepath.Join("themes", c.theme)))
|
||||
themeFiles, err := fs.Sub(c.webFS, path.Join("themes", c.theme))
|
||||
if err != nil {
|
||||
return nil, nil, nil, fmt.Errorf("read themes dir: %v", err)
|
||||
}
|
||||
|
@ -133,7 +132,7 @@ func loadTemplates(c webConfig, templatesDir string) (*templates, error) {
|
|||
if file.IsDir() {
|
||||
continue
|
||||
}
|
||||
filenames = append(filenames, filepath.ToSlash(filepath.Join(templatesDir, file.Name())))
|
||||
filenames = append(filenames, path.Join(templatesDir, file.Name()))
|
||||
}
|
||||
if len(filenames) == 0 {
|
||||
return nil, fmt.Errorf("no files in template dir %q", templatesDir)
|
||||
|
|
Loading…
Reference in a new issue