diff --git a/lib/server/console.js b/lib/server/console.js index 2e29ae14..93320fa0 100644 --- a/lib/server/console.js +++ b/lib/server/console.js @@ -105,6 +105,8 @@ connName, ret, isContain, isVolume = win.isChangeVolume(command), + isCD = command.match(new RegExp('^cd ')), + isCDWin = command.match(new RegExp('^cd ', 'i')), symbolsExec = ['*', '&', '{', '}', '|', '\'', '"'], CWD = process.cwd(), @@ -121,7 +123,7 @@ if (equalPart(command, CLOUDCMD)) ret = onCloudCmd(command, callback); - else if (equalPart(command, 'cd ') || isVolume) { + else if (isCD || isCDWin && WIN || isVolume) { ret = true; onCD(command, dir, function(error, json) {