Skip to content

Commit

Permalink
Avoid throwing manifest load errors on try upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Nov 14, 2022
1 parent 4c2c39d commit e6b06e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Bonsai.Editor/GraphModel/UpgradeHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ static Stream GetWorkflowStream(string path)

internal static bool TryUpgradeWorkflow(ExpressionBuilderGraph workflow, string fileName, out ExpressionBuilderGraph upgradedWorkflow)
{
var workflowStream = GetWorkflowStream(fileName);
Stream workflowStream;
try { workflowStream = GetWorkflowStream(fileName); }
catch (SystemException) { workflowStream = null; }

if (workflowStream != null)
{
using var reader = XmlReader.Create(workflowStream);
Expand Down

0 comments on commit e6b06e9

Please sign in to comment.