mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-11-29 08:55:57 +00:00
write jsonrpc2.yml atomically
8990c1f added writeFileAtomic, but only used it in
SignalCliApiConfig.Persist() (api-config.yml). jsonrpc2.yml is written
by JsonRpc2ClientConfig.Persist(), which still used ioutil.WriteFile,
so the REST API could still read an empty jsonrpc2.yml while
jsonrpc2-helper rewrites it and start without any JSON-RPC client.
see #893
This commit is contained in:
1 file changed
+1
-1
+1
-1
@@ -69,5 +69,5 @@ func (c *JsonRpc2ClientConfig) Persist(path string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
return ioutil.WriteFile(path, out, 0644)
|
||||
return writeFileAtomic(path, out, 0644)
|
||||
}
|
||||
Reference in new issue
Block a user