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

@@ -31,7 +31,7 @@ func (b *Buffer) Serialize() error {
return nil
}
name := config.ConfigDir + "/buffers/" + util.EscapePath(b.AbsPath)
name := filepath.Join(config.ConfigDir, "buffers", util.EscapePath(b.AbsPath))
return overwriteFile(name, encoding.Nop, func(file io.Writer) error {
err := gob.NewEncoder(file).Encode(SerializedBuffer{