Skip to content

Commit

Permalink
nef file path support
Browse files Browse the repository at this point in the history
  • Loading branch information
Hecate2 committed Sep 12, 2024
1 parent db768ef commit de87121
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/Neo.CLI/CLI/MainService.Tools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Numerics;
using System.Reflection;
Expand Down Expand Up @@ -449,11 +450,16 @@ private static string Base64Fixed(string str)
private string? NefFileAnalyis(string base64)
{
byte[] nefData;
try
if (File.Exists(base64)) // extension name not considered
nefData = File.ReadAllBytes(base64);
else
{
nefData = Convert.FromBase64String(base64);
try
{
nefData = Convert.FromBase64String(base64);
}
catch { return null; }
}
catch { return null; }
NefFile nef;
Script script;
bool verifyChecksum = false;
Expand Down

0 comments on commit de87121

Please sign in to comment.