mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
fix unauthorised access crash when saving jsons
This commit is contained in:
parent
3f61518f11
commit
a39fc65ec9
@ -65,7 +65,7 @@ namespace Bloxstrap
|
|||||||
{
|
{
|
||||||
File.WriteAllText(FileLocation, JsonSerializer.Serialize(Prop, new JsonSerializerOptions { WriteIndented = true }));
|
File.WriteAllText(FileLocation, JsonSerializer.Serialize(Prop, new JsonSerializerOptions { WriteIndented = true }));
|
||||||
}
|
}
|
||||||
catch (IOException ex)
|
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||||
{
|
{
|
||||||
App.Logger.WriteLine(LOG_IDENT, "Failed to save");
|
App.Logger.WriteLine(LOG_IDENT, "Failed to save");
|
||||||
App.Logger.WriteException(LOG_IDENT, ex);
|
App.Logger.WriteException(LOG_IDENT, ex);
|
||||||
|
Loading…
Reference in New Issue
Block a user