Close file properly in clean and update makefile

This commit is contained in:
Zachary Yedidia
2020-06-27 17:55:01 -04:00
parent 60846f549c
commit be4d186a46
2 changed files with 3 additions and 3 deletions

View File

@@ -97,14 +97,13 @@ func CleanConfig() {
file, e := os.Open(fname)
if e == nil {
defer file.Close()
decoder := gob.NewDecoder(file)
err = decoder.Decode(&buffer)
if err != nil && f.Name() != "history" {
badFiles = append(badFiles, fname)
}
file.Close()
}
}