diff --git a/lib/client/dom.js b/lib/client/dom.js index 2e017669..f8ebe525 100644 --- a/lib/client/dom.js +++ b/lib/client/dom.js @@ -1472,6 +1472,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; */ this.getCurrentData = function(pCallBack, pCurrentFile) { var lParams, + isFromStorage, lCurrentFile = pCurrentFile ? pCurrentFile : this.getCurrentFile(), lPath = DOM.getCurrentPath(lCurrentFile), @@ -1486,7 +1487,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; lName += lExt; } - DOM.saveDataToStorage(lPath, pData); + if (!isFromStorage) + DOM.saveDataToStorage(lPath, pData); Util.exec(pCallBack, { data: pData, @@ -1503,9 +1505,10 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog; }; DOM.getDataFromStorage(lPath, function(data) { - if (data) + if (data) { + isFromStorage = true; lFunc(data); - else + } else DOM.getCurrentFileContent(lParams, lCurrentFile); }); };