chore(socket) add " "

This commit is contained in:
coderaiser 2013-11-18 08:19:24 +00:00
parent 99ac9e6395
commit 7ea932359d

View file

@ -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);
}