mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
Woops, I screw up the writer again.
This commit is contained in:
parent
9797f62cb8
commit
1fb56f0ad2
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user