mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-18 17:05:17 +00:00
fix(console) getOnMessage onCD: if error do not change path
This commit is contained in:
parent
5d363564a3
commit
2775d4cfc6
1 changed files with 8 additions and 4 deletions
|
|
@ -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)
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue