kopia lustrzana https://github.com/cyoung/stratux
Config: overwrite with new.
rodzic
5601150555
commit
fa9321246e
|
@ -474,7 +474,7 @@ func readSettings() {
|
||||||
}
|
}
|
||||||
|
|
||||||
func saveSettings() {
|
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()
|
defer fd.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("can't save settings %s: %s\n", configLocation, err.Error())
|
log.Printf("can't save settings %s: %s\n", configLocation, err.Error())
|
||||||
|
|
Ładowanie…
Reference in New Issue