Browse Source

Woops, I screw up the writer again.

Jakob Borg 11 years ago
parent
commit
1fb56f0ad2
1 changed files with 5 additions and 2 deletions
  1. 5 2
      model/model.go

+ 5 - 2
model/model.go

@@ -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()