Fix bug of empty lines created in loginsFile by account editing.
このコミットが含まれているのは:
コミット
694b9da2f2
3
main.go
3
main.go
|
@ -174,7 +174,8 @@ func accountPostHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
text = []byte(strings.Join(lines, "\n"))
|
linesJoined := strings.Join(lines, "\n")
|
||||||
|
text = []byte(linesJoined[:len(linesJoined)-1])
|
||||||
tmpFile := "tmp_" + loginsFile
|
tmpFile := "tmp_" + loginsFile
|
||||||
if err := ioutil.WriteFile(tmpFile, []byte(text), 0600); err != nil {
|
if err := ioutil.WriteFile(tmpFile, []byte(text), 0600); err != nil {
|
||||||
log.Fatal("Trouble writing file", err)
|
log.Fatal("Trouble writing file", err)
|
||||||
|
|
読み込み中…
新しいイシューから参照