fix(client) goToParentDir: set current dir

This commit is contained in:
coderaiser 2016-01-14 14:40:56 -05:00
parent 7f212b116b
commit e1683f6743

View file

@ -513,13 +513,26 @@ var Util, DOM, CloudFunc, join;
this.goToParentDir = function() {
var path = Info.dirPath,
dir = Info.dir,
parentPath = Info.parentDirPath;
if (path !== parentPath) {
path = parentPath;
CloudCmd.loadDir({
path: path
path: path,
}, function() {
var current,
panel = Info.panel;
current = DOM.getCurrentByName(dir);
if (!current)
current = DOM.getFiles(panel)[0];
DOM.setCurrentFile(current, {
history: history
});
});
}
};