diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/internal/ptycon_open_impl.c | 2 | ||||
-rw-r--r-- | src/pty/ptyc_spawn.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/internal/ptycon_open_impl.c b/src/internal/ptycon_open_impl.c index efda8bc..8ab9d61 100644 --- a/src/internal/ptycon_open_impl.c +++ b/src/internal/ptycon_open_impl.c @@ -52,7 +52,7 @@ static int32_t ptyc_open( /* oa */ oa.len = sizeof(nt_oa); - oa.root_dir = hat; + oa.root_dir = (buffer[0]=='\\') ? 0 : hat; oa.obj_name = &path; oa.obj_attr = fprivate ? 0 : NT_OBJ_INHERIT; oa.sec_desc = 0; diff --git a/src/pty/ptyc_spawn.c b/src/pty/ptyc_spawn.c index 9ad8e9b..3655d19 100644 --- a/src/pty/ptyc_spawn.c +++ b/src/pty/ptyc_spawn.c @@ -79,7 +79,9 @@ int __stdcall ptyc_spawn(struct ptyc_driver_ctx * dctx) : peb->process_params->cwd_handle; patharg = (dctx->cctx->eargv[0][0] == '/') - ? &dctx->cctx->eargv[0][1] + ? (dctx->cctx->eargv[0][1] == '?') + ? &dctx->cctx->eargv[0][0] + : &dctx->cctx->eargv[0][1] : &dctx->cctx->eargv[0][0]; /* hfile */ |