From 2e0f8589e4458e4649829020d53bfed1c93f8ce5 Mon Sep 17 00:00:00 2001 From: Tyron Brand Date: Thu, 21 Oct 2021 23:14:53 +0100 Subject: [PATCH] use path.combine --- src/Flow.Net.SDK/Utilities.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Flow.Net.SDK/Utilities.cs b/src/Flow.Net.SDK/Utilities.cs index c35c63be..d23b9e96 100644 --- a/src/Flow.Net.SDK/Utilities.cs +++ b/src/Flow.Net.SDK/Utilities.cs @@ -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(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)