This repository was archived by the owner on Apr 27, 2026. It is now read-only.
Commit 6f6b26a
authored
fix: update OCPP 1.6 configuration via a separate file (#1113)
If there is a crash or power outage while writing a file
it can be left in a corrupt state.
Updates are instead written to a new file and once complete
the new file is renamed to replace the original file.
This reduces the window where a file update could be lost
and reduces the chance that a file is corrupted.
Using a journalling file system can also help.
Signed-off-by: James Chapman <james.chapman@pionix.de>1 parent 89c7b62 commit 6f6b26a
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
217 | 231 | | |
218 | 232 | | |
219 | 233 | | |
| |||
0 commit comments