diff --git a/lib/client.js b/lib/client.js index c550a6b3..46dddcbf 100644 --- a/lib/client.js +++ b/lib/client.js @@ -237,7 +237,6 @@ var Util, DOM, CloudFunc, CloudCmd; DOM.setCurrentFile(files[0]); Listeners = CloudCmd.Listeners; - Listeners.init(); /* загружаем Google Analytics */ Listeners.analytics(); @@ -247,16 +246,17 @@ var Util, DOM, CloudFunc, CloudCmd; CloudCmd.KeysPanel = Listeners.initKeysPanel(); CloudCmd.getConfig(function(config) { - var localStorage = config.localStorage; + var localStorage = config.localStorage, + dirPath = DOM.getCurrentDirPath(); + /* устанавливаем переменную доступности кэша */ Storage.setAllowed(localStorage); /* Устанавливаем кэш корневого каталога */ - var lDirPath = DOM.getCurrentDirPath(); - lDirPath = CloudFunc.rmLastSlash(lDirPath) || '/'; + dirPath = CloudFunc.rmLastSlash(dirPath) || '/'; - if (!Storage.get(lDirPath)) - Storage.set(lDirPath, getJSONfromFileTable()); + if (!Storage.get(dirPath)) + Storage.set(dirPath, getJSONfromFileTable()); }); Util.exec(CloudCmd.Key);