aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bin/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 0f2f7e5..62f8f91 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -874,6 +874,16 @@ remote:
if (ipc_instance_add(&inst))
goto end;
}
+ else
+ {
+ if (!cd)
+ {
+ char buf[PATH_MAX];
+ getcwd(buf, sizeof(buf));
+
+ cd = strdup(buf);
+ }
+ }
if ((!single) && (config->multi_instance))
{
ipc_instance_new_func_set(main_ipc_new);