fix(menu) set current file after upload from cloud

This commit is contained in:
coderaiser 2017-04-18 11:47:30 +03:00
parent 7b240cab34
commit b13f1f4de7

View file

@ -250,9 +250,13 @@ function MenuProto(position) {
CloudCmd.execFromModule('Cloud', 'saveFile', (name, data) => {
const path = DOM.getCurrentDirPath() + name;
const setCurrent = () => DOM.setCurrentByName(name);
RESTful.write(path, data, (error) => {
!error && CloudCmd.refresh();
if (error)
return;
CloudCmd.refresh(null, setCurrent);
});
});
}