mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-01-31 00:19:00 +03:00
Octol1ttle
31968837e5
This PR fixes an issue that caused guild data JSON files to be corrupted upon saving. As it turns out `File.OpenWrite(string)` does not clear the file before writing to it. That means, if a file contains `{"MyKey": "MyValue"}` and I write `{}` to it using `File.OpenWrite(string)`, the contents of the file will be `{}MyKey": "MyValue"}`. This is a malformed JSON and will cause an error upon next bot startup. In addition, this PR blacklists the `File.OpenWrite` method using `CodeAnalysis/BannedSymbols.txt` to prevent its accidental use in the future. Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com> |
||
---|---|---|
.. | ||
BannedSymbols.txt |