Skip to content

Commit f12d853

Browse files
authored
Fix allowing spaces in username folder path (#55)
1 parent 1ed98c2 commit f12d853

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nanoFirmwareFlasher/StmJtagDevice.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public ExitCodes FlashHexFiles(IList<string> files)
138138
Console.WriteLine($"{Path.GetFileName(hexFile)}");
139139
}
140140

141-
cliOutput = RunStLinkCli($"-c SN={DeviceId} UR -Q -P {hexFile}");
141+
cliOutput = RunStLinkCli($"-c SN={DeviceId} UR -Q -P \"{hexFile}\"");
142142

143143
if (!cliOutput.Contains("Programming Complete."))
144144
{
@@ -255,7 +255,7 @@ public ExitCodes FlashBinFiles(IList<string> files, IList<string> addresses)
255255
Console.WriteLine($"{Path.GetFileName(binFile)} @ {addresses.ElementAt(index)}");
256256
}
257257

258-
cliOutput = RunStLinkCli($"-c SN={DeviceId} UR -Q -P {binFile} {addresses.ElementAt(index++)}");
258+
cliOutput = RunStLinkCli($"-c SN={DeviceId} UR -Q -P \"{binFile}\" {addresses.ElementAt(index++)}");
259259

260260
if (!cliOutput.Contains("Programming Complete."))
261261
{

0 commit comments

Comments
 (0)