Config: overwrite with new.

pull/27/head
Christopher Young 2015-08-26 16:26:23 -04:00
rodzic 5601150555
commit fa9321246e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -474,7 +474,7 @@ func readSettings() {
}
func saveSettings() {
fd, err := os.OpenFile(configLocation, os.O_CREATE|os.O_WRONLY, os.FileMode(0644))
fd, err := os.OpenFile(configLocation, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, os.FileMode(0644))
defer fd.Close()
if err != nil {
log.Printf("can't save settings %s: %s\n", configLocation, err.Error())