1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-07 02:53:58 +00:00

Added quotes to selfupdate path copy operation

This commit is contained in:
Bryan Roe
2020-11-04 19:58:35 -08:00
parent be4e79941c
commit b2bb58cc96

View File

@@ -5653,7 +5653,7 @@ int MeshAgent_Start(MeshAgentHostContainer *agentHost, int paramLen, char **para
chmod(updateFilePath, results.st_mode); // Set the new executable to the same mode as the current one.
remove(agentHost->exePath);
sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "cp %s %s", updateFilePath, agentHost->exePath);
sprintf_s(ILibScratchPad, sizeof(ILibScratchPad), "cp \"%s\" \"%s\"", updateFilePath, agentHost->exePath);
if (system(ILibScratchPad)) {}
ignore_result(write(STDOUT_FILENO, "SelfUpdate -> Restarting Agent...\n", 34));