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:
@@ -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));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user