提交 a02ae3ce 编写于 作者: Z Zachary Yedidia

Replace home directory before performing SaveAs

Fixes #820
上级 54c02f47
......@@ -409,9 +409,9 @@ func (b *Buffer) SaveAs(filename string) error {
}
str := b.SaveString(b.Settings["fileformat"] == "dos")
data := []byte(str)
err := ioutil.WriteFile(filename, data, 0644)
err := ioutil.WriteFile(ReplaceHome(filename), data, 0644)
if err == nil {
b.Path = ReplaceHome(filename)
b.Path = filename
b.IsModified = false
b.ModTime, _ = GetModTime(filename)
return b.Serialize()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册