From 982cf6ac63b274edb18515006d00e8ac9a45165c Mon Sep 17 00:00:00 2001 From: Konstantin Knizhnik Date: Thu, 25 Apr 2019 19:53:35 +0300 Subject: [PATCH] Fix error in forming remote path for Windows --- src/pg_probackup.c | 1 + src/utils/remote.c | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pg_probackup.c b/src/pg_probackup.c index 339c282f..3946f0c9 100644 --- a/src/pg_probackup.c +++ b/src/pg_probackup.c @@ -298,6 +298,7 @@ main(int argc, char *argv[]) else if (strcmp(argv[1], "agent") == 0 && argc > 2) { remote_agent = argv[2]; + sleep(10); if (strcmp(remote_agent, PROGRAM_VERSION) != 0) { uint32 agent_version = parse_program_version(remote_agent); diff --git a/src/utils/remote.c b/src/utils/remote.c index 139d4e4a..ab27bf71 100644 --- a/src/utils/remote.c +++ b/src/utils/remote.c @@ -137,9 +137,12 @@ bool launch_agent(void) probackup = sep + 1; } } -#endif + snprintf(cmd, sizeof(cmd), "%s\\%s agent %s", + instance_config.remote.path, probackup, PROGRAM_VERSION); +#else snprintf(cmd, sizeof(cmd), "%s/%s agent %s", instance_config.remote.path, probackup, PROGRAM_VERSION); +#endif } else { snprintf(cmd, sizeof(cmd), "%s agent %s", pg_probackup, PROGRAM_VERSION); }