WIP
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
//go:build ignore
|
||||
|
||||
package peer
|
||||
|
||||
import (
|
||||
@@ -48,7 +50,7 @@ func storeJson(x any, outPath string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
f, err := os.Create(tmpPath)
|
||||
f, err := os.OpenFile(tmpPath, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -94,4 +96,3 @@ func loadPeerConfig(netName string) (pc LocalConfig, err error) {
|
||||
func loadNetworkState(netName string) (ps m.NetworkState, err error) {
|
||||
return ps, loadJson(peerStatePath(netName), &ps)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user