Woops, I screw up the writer again.

This commit is contained in:
Jakob Borg 2014-09-22 16:53:57 +02:00
parent 9797f62cb8
commit 1fb56f0ad2

View File

@ -624,9 +624,12 @@ func (m *Model) SetIgnores(repo string, content []string) error {
}
defer os.Remove(fd.Name())
writer := bufio.NewWriter(fd)
for _, line := range content {
fmt.Fprintln(writer, line)
_, err = fmt.Fprintln(fd, line)
if err != nil {
l.Warnln("Saving .stignore:", err)
return err
}
}
err = fd.Close()