mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-09 17:53:59 +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())
|
defer os.Remove(fd.Name())
|
||||||
|
|
||||||
writer := bufio.NewWriter(fd)
|
|
||||||
for _, line := range content {
|
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()
|
err = fd.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user