Commit 1fb56f0a authored by Jakob Borg's avatar Jakob Borg

Woops, I screw up the writer again.

parent 9797f62c
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment