fix(console) getOnMessage onCD: if error do not change path

This commit is contained in:
coderaiser 2014-07-08 04:30:00 -04:00
parent 5d363564a3
commit 2775d4cfc6

View file

@ -115,11 +115,15 @@
else if (equalPart(command, 'cd ')) {
ret = true;
onCD(command, dir, function(json) {
var path = json.path;
onCD(command, dir, function(error, json) {
var path = '';
if (!error) {
path = json.path;
ClientDirs[connNum] = path;
}
callback(json);
ClientDirs[connNum] = path;
});
}
@ -275,7 +279,7 @@
if (errorData)
errorStr = Util.stringifyJSON(errorData);
Util.exec(callback, {
callback(errorData, {
stderr : errorStr,
path : CloudFunc.rmNewLine(stdout)
});