mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-24 03:05:41 +00:00
chore(socket) add " "
This commit is contained in:
parent
99ac9e6395
commit
7ea932359d
1 changed files with 12 additions and 11 deletions
|
|
@ -252,7 +252,7 @@
|
|||
|
||||
}
|
||||
|
||||
if( Util.strCmp(pCommand, 'exit') )
|
||||
if(Util.strCmp(pCommand, 'exit'))
|
||||
process.exit();
|
||||
}
|
||||
else {
|
||||
|
|
@ -264,15 +264,15 @@
|
|||
|
||||
function onCD(pCommand) {
|
||||
var lRet, lDir, lHome, lError,
|
||||
lMsg = '';
|
||||
lMsg = '';
|
||||
|
||||
lDir = Util.removeStr(pCommand, 'cd ');
|
||||
lHome = process.env.HOME;
|
||||
lDir = Util.removeStr(pCommand, 'cd ');
|
||||
lHome = process.env.HOME;
|
||||
|
||||
if ( Util.isContainStr(lDir, '~') )
|
||||
lDir = Util.replaceStr(lDir, '~', lHome);
|
||||
if (Util.isContainStr(lDir, '~'))
|
||||
lDir = Util.replaceStr(lDir, '~', lHome);
|
||||
|
||||
lError = Util.tryCatchLog(function() {
|
||||
lError = Util.tryCatchLog(function() {
|
||||
process.chdir(lDir);
|
||||
});
|
||||
|
||||
|
|
@ -281,7 +281,7 @@
|
|||
lMsg = lError;
|
||||
}
|
||||
|
||||
lRet = {
|
||||
lRet = {
|
||||
stderr: lMsg
|
||||
};
|
||||
|
||||
|
|
@ -290,14 +290,15 @@
|
|||
|
||||
|
||||
function log(pConnNum, pStr, pType) {
|
||||
var lRet, lType = ' ';
|
||||
var lRet,
|
||||
lType = ' ';
|
||||
|
||||
if (pStr) {
|
||||
|
||||
if (pType)
|
||||
lType += pType + ':';
|
||||
lType += pType + ':';
|
||||
|
||||
lRet = 'client #' + pConnNum + lType + pStr;
|
||||
lRet = 'client #' + pConnNum + lType + pStr;
|
||||
|
||||
Util.log(lRet);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue