Reset ModTime even if WriteFile fails

Ref #440
This commit is contained in:
Zachary Yedidia
2016-11-03 10:55:44 -04:00
parent b4b0eda7d9
commit 4c0b00bf2b
2 changed files with 2 additions and 1 deletions

View File

@@ -283,6 +283,7 @@ func (b *Buffer) SaveAs(filename string) error {
b.ModTime, _ = GetModTime(filename)
return b.Serialize()
}
b.ModTime, _ = GetModTime(filename)
return err
}

View File

@@ -46,7 +46,7 @@ var (
// Version is the version number or commit hash
// These variables should be set by the linker when compiling
Version = "Unknown"
Version = "0.0.0-unknown"
CommitHash = "Unknown"
CompileDate = "Unknown"