From 5921235a93139d4c2b5a8f8ab208b2a01531d9fa Mon Sep 17 00:00:00 2001 From: Bryan Roe Date: Thu, 7 Jan 2021 22:09:56 -0800 Subject: [PATCH] Added missing handler for 'escapeBackSlash' --- meshcore/agentcore.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/meshcore/agentcore.c b/meshcore/agentcore.c index 4620fa2..2e378eb 100644 --- a/meshcore/agentcore.c +++ b/meshcore/agentcore.c @@ -1990,6 +1990,14 @@ char* MeshAgent_MakeAbsolutePathEx(char *basePath, char *localPath, int escapeBa } //printf("MeshAgent_MakeAbsolutePathEx[%s,%s] = %s\n", basePath, localPath, ILibScratchPad2); + + if (escapeBackSlash != 0) + { + char *tmp = ILibString_Replace(ILibScratchPad2, strnlen_s(ILibScratchPad2, sizeof(ILibScratchPad2)), "\\", 1, "\\\\", 2); + size_t tmplen = strnlen_s(tmp, sizeof(ILibScratchPad2)); + strcpy_s(ILibScratchPad2, sizeof(ILibScratchPad2), tmp); + free(tmp); + } return(ILibScratchPad2); }