From f9a4770f4cdf86581b7b15636c6a8dcc459717ad Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 26 Jun 2017 12:18:16 +0300 Subject: [PATCH] fix(client) save directory path and file list to storage when dirStorage disabled --- client/client.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/client.js b/client/client.js index 6444bcf2..d2292e22 100644 --- a/client/client.js +++ b/client/client.js @@ -331,14 +331,16 @@ function CloudCmdProto(Util, DOM) { Listeners.initKeysPanel(); + if (!CloudCmd.config('dirStorage')) + return callback(); + Storage.get(dirPath, (error, data) => { if (!data) { data = getJSONfromFileTable(); Storage.set(dirPath, data); } + callback(); }); - - callback(); } function getPanels() { @@ -423,8 +425,6 @@ function CloudCmdProto(Util, DOM) { if (error) return; - Storage.set(path, obj); - options.sort = sort; options.order = order; @@ -434,6 +434,11 @@ function CloudCmdProto(Util, DOM) { exec(callback); }); + + if (!CloudCmd.config('dirStorage')) + return; + + Storage.set(path, obj); }); };