diff --git a/lib/server/console.js b/lib/server/console.js index 7ca12790..2e29ae14 100644 --- a/lib/server/console.js +++ b/lib/server/console.js @@ -25,7 +25,7 @@ ClientFuncs = [], ClientDirs = [], Clients = [], - WIN32 = process.platform === 'win32', + WIN = process.platform === 'win32', addNewLine = CloudFunc.addNewLine, @@ -137,7 +137,7 @@ } if (!ret) { - if (WIN32) + if (WIN) command = 'cmd /C ' + command; if (!ClientFuncs[connNum]) @@ -160,7 +160,7 @@ Util.exec(callback, { stdout: command }, true); - } else if (WIN32 || firstChar === ' ' || isContain) + } else if (WIN || firstChar === ' ' || isContain) exec(command, options, funcExec); else setSpawn(command, options, callback); @@ -276,7 +276,7 @@ isVolume = win.isVolume(command), paramDir = Util.rmStr(command, 'cd '), isRootOrHome = equalPart(paramDir, ['/', '~']), - getDir = WIN32 ? 'chdir' : 'pwd'; + getDir = WIN ? 'chdir' : 'pwd'; if (!isRootOrHome && !isChangeVolume || isVolume) command = 'cd ' + path.join(currDir, paramDir);