mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 01:47:35 +00:00
fix(dom) getCurrentData: add isCurrentIsDir
This commit is contained in:
parent
3e83bc7912
commit
ead9d2775e
1 changed files with 12 additions and 8 deletions
|
|
@ -1490,7 +1490,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
var lParams,
|
||||
lHash,
|
||||
lCurrentFile = pCurrentFile ? pCurrentFile : this.getCurrentFile(),
|
||||
lPath = DOM.getCurrentPath(lCurrentFile),
|
||||
lPath = DOM.getCurrentPath(lCurrentFile),
|
||||
isDir = DOM.isCurrentIsDir(lCurrentFile),
|
||||
|
||||
lFunc = function(pData) {
|
||||
var lExt = '.json',
|
||||
|
|
@ -1521,14 +1522,17 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
};
|
||||
|
||||
|
||||
DOM.checkStorageHash(lPath, function(error, equal, hash) {
|
||||
Util.ifExec(!error && equal, function() {
|
||||
DOM.getDataFromStorage(lPath, lFunc);
|
||||
}, function() {
|
||||
lHash = hash;
|
||||
DOM.getCurrentFileContent(lParams, lCurrentFile);
|
||||
if (isDir)
|
||||
DOM.getCurrentFileContent(lParams, lCurrentFile);
|
||||
else
|
||||
DOM.checkStorageHash(lPath, function(error, equal, hash) {
|
||||
Util.ifExec(!error && equal, function() {
|
||||
DOM.getDataFromStorage(lPath, lFunc);
|
||||
}, function() {
|
||||
lHash = hash;
|
||||
DOM.getCurrentFileContent(lParams, lCurrentFile);
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue