Skip to content

Commit

Permalink
Merge branch 'main' into integrations-upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
CubesterYT authored Dec 19, 2024
2 parents 9318813 + 84822e2 commit c9dabd6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Bloxstrap/JsonManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,17 @@ public virtual void Load(bool alertFailure = true)

if (!String.IsNullOrEmpty(message))
Frontend.ShowMessageBox($"{message}\n\n{ex.Message}", System.Windows.MessageBoxImage.Warning);

try
{
// Create a backup of loaded file
File.Copy(FileLocation, FileLocation + ".bak", true);
}
catch (Exception copyEx)
{
App.Logger.WriteLine(LOG_IDENT, $"Failed to create backup file: {FileLocation}.bak");
App.Logger.WriteException(LOG_IDENT, copyEx);
}
}

Save();
Expand Down

0 comments on commit c9dabd6

Please sign in to comment.