Skip to content

Commit

Permalink
fix unauthorised access crash when saving jsons
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Dec 8, 2024
1 parent 3f61518 commit a39fc65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Bloxstrap/JsonManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public virtual void Save()
{
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.WriteException(LOG_IDENT, ex);
Expand Down

0 comments on commit a39fc65

Please sign in to comment.