mirror of
https://github.com/felixangell/phi.git
synced 2024-08-16 11:10:37 +03:00
use path/filepath instead of path
This commit is contained in:
parent
a4f032f4e4
commit
374ea255ec
6
main.go
6
main.go
@ -5,7 +5,7 @@ import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
@ -65,14 +65,14 @@ func (n *PhiEditor) init(cfg *cfg.TomlConfig) {
|
||||
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
fontFolder = path.Join(os.Getenv("%WINDIR%"), "fonts")
|
||||
fontFolder = filepath.Join(os.Getenv("WINDIR"), "fonts")
|
||||
case "darwin":
|
||||
fontFolder = "/Library/Fonts/"
|
||||
case "linux":
|
||||
fontFolder = "/usr/share/fonts/"
|
||||
}
|
||||
|
||||
fontPath := path.Join(fontFolder, cfg.Editor.Font_Face) + ".ttf"
|
||||
fontPath := filepath.Join(fontFolder, cfg.Editor.Font_Face) + ".ttf"
|
||||
|
||||
font, err := strife.LoadFont(fontPath, cfg.Editor.Font_Size)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user