Skip to content

Commit

Permalink
use path.combine
Browse files Browse the repository at this point in the history
  • Loading branch information
tyronbrand committed Oct 21, 2021
1 parent aa80ad7 commit 2e0f858
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Flow.Net.SDK/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ public static FlowConfig ReadConfig(string fileName = null, string path = null)
if (string.IsNullOrEmpty(path))
path = AppContext.BaseDirectory;

var file = File.ReadAllText($"{path}\\{fileName}.json");
var file = File.ReadAllText(Path.Combine(path, $"{fileName}.json"));
return JsonConvert.DeserializeObject<FlowConfig>(file);
}

public static string ReadCadenceScript(string fileName, string path = null)
{
if (string.IsNullOrEmpty(path))
path = $"{AppContext.BaseDirectory}\\Cadence";
path = Path.Combine(AppContext.BaseDirectory, "Cadence");

return File.ReadAllText($"{path}\\{fileName}.cdc");
return File.ReadAllText(Path.Combine(path, $"{fileName}.cdc"));
}

public static byte[] Pad(string tag, int length, bool padLeft = true)
Expand Down

0 comments on commit 2e0f858

Please sign in to comment.