From 3932f84586027e26fb130dc46f10e0c85bc4d2ee Mon Sep 17 00:00:00 2001 From: Ambrose Chua Date: Mon, 12 Mar 2018 01:26:06 +0900 Subject: [PATCH] Fix incorrect CWDs --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 02f19df..b8c780d 100755 --- a/index.js +++ b/index.js @@ -403,7 +403,7 @@ if (shellable || cmdable) { child_process.exec(cmd, { shell: shell, - cwd: res.filename, + cwd: relative(res.filename), timeout: 60 * 1000, }, (err, stdout, stderr) => { if (err) { @@ -430,7 +430,7 @@ if (shellable || cmdable) { }); io.on("connection", (socket) => { - let cwd = socket.handshake.query.path; + let cwd = relative(socket.handshake.query.path); let term = pty.spawn(exec, args, { name: "xterm-256color",