Use path instead of filepath

master
kts of kettek 2023-07-28 18:33:19 -07:00
parent 98207ec716
commit 01558a3f77
1 changed files with 3 additions and 1 deletions

View File

@ -5,11 +5,13 @@ import (
"encoding/json"
"image"
"log"
"path"
"path/filepath"
"strings"
)
// FS is our exported FS.
//
//go:embed images/* mapping.json
var fs embed.FS
@ -27,7 +29,7 @@ func Init() {
if !e.IsDir() {
ext := filepath.Ext(e.Name())
name := strings.TrimSuffix(e.Name(), ext)
f, err := fs.Open(filepath.Join("./images", e.Name()))
f, err := fs.Open(path.Join("images", e.Name()))
if err != nil {
log.Println(err)
continue