Use filepath.Join more

This commit is contained in:
Zachary Yedidia
2020-02-11 13:09:17 -05:00
parent 34724b941a
commit 695d4c2b1b
8 changed files with 20 additions and 16 deletions

View File

@@ -272,8 +272,8 @@ func NewBuffer(r io.Reader, size int64, path string, startcursor Loc, btype BufT
b.UpdateRules()
config.InitLocalSettings(b.Settings, b.Path)
if _, err := os.Stat(config.ConfigDir + "/buffers/"); os.IsNotExist(err) {
os.Mkdir(config.ConfigDir+"/buffers/", os.ModePerm)
if _, err := os.Stat(filepath.Join(config.ConfigDir, "buffers")); os.IsNotExist(err) {
os.Mkdir(filepath.Join(config.ConfigDir, "buffers"), os.ModePerm)
}
if startcursor.X != -1 && startcursor.Y != -1 {