From 94447c558ef51e53b6970da717815b25c8ffe337 Mon Sep 17 00:00:00 2001 From: Hunter Bridges <775593+hunterbridges@users.noreply.github.com> Date: Tue, 7 Feb 2023 13:07:14 -0800 Subject: [PATCH] Fix construction of arArgs in IDE.BuildContext.QueueProjectGNUArchive on Windows --- IDE/src/BuildContext.bf | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/IDE/src/BuildContext.bf b/IDE/src/BuildContext.bf index 6d6726d5..5c4afedd 100644 --- a/IDE/src/BuildContext.bf +++ b/IDE/src/BuildContext.bf @@ -249,7 +249,13 @@ namespace IDE } else { - arArgs.AppendF($"-qc {targetPath}"); + arArgs.AppendF($"-qc "); + String fixedTargetPath = scope .(targetPath); + IDEUtils.FixFilePath(fixedTargetPath); +#if BF_PLATFORM_WINDOWS + fixedTargetPath.Replace("\\", "\\\\"); +#endif + IDEUtils.AppendWithOptionalQuotes(arArgs, fixedTargetPath); void AddObject(StringView obj) { @@ -257,7 +263,13 @@ namespace IDE return; arArgs.Append(" "); - arArgs.Append(obj); + + String fixedObjPath = scope .(obj); + IDEUtils.FixFilePath(fixedObjPath); +#if BF_PLATFORM_WINDOWS + fixedObjPath.Replace("\\", "\\\\"); +#endif + IDEUtils.AppendWithOptionalQuotes(arArgs, fixedObjPath); } bool inQuote = false;