mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-29 02:30:28 +00:00
fix(client) save directory path and file list to storage when dirStorage disabled
This commit is contained in:
parent
6ea54f25c9
commit
f9a4770f4c
1 changed files with 9 additions and 4 deletions
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue