feature(socket) any client could work with own dir

This commit is contained in:
coderaiser 2013-11-18 10:05:48 +00:00
parent baf5629ddd
commit 7035a5a52f

View file

@ -293,6 +293,7 @@
function onCD(pCommand, currDir, callback) {
var dir,
getDir = WIN32 ? 'chdir' : 'pwd',
paramDir = Util.removeStr(pCommand, 'cd ');
if (equalPart(paramDir, ['/', '~', '.']))
@ -302,7 +303,7 @@
console.log(dir, paramDir);
exec('cd ' + dir + ' && pwd', function (error, stdout, stderr) {
exec('cd ' + dir + ' && ' + getDir, function (error, stdout, stderr) {
var lRet,
lMsg = '',
lError = error || stderr;