mirror of
https://github.com/zen-browser/components.git
synced 2025-07-07 22:29:59 +02:00
Refactor: Migrate workspaces from JSON to new storage system
This commit is contained in:
parent
c67cca9c70
commit
5822df61e5
1 changed files with 4 additions and 2 deletions
|
@ -27,8 +27,10 @@ var ZenWorkspacesStorage = {
|
|||
if (await IOUtils.exists(oldWorkspacesPath)) {
|
||||
console.info('ZenWorkspacesStorage: Migrating workspaces from JSON...');
|
||||
const oldWorkspaces = await IOUtils.readJSON(oldWorkspacesPath);
|
||||
for (const workspace of oldWorkspaces.workspaces) {
|
||||
await this.saveWorkspace(workspace);
|
||||
if (oldWorkspaces.workspaces) {
|
||||
for (const workspace of oldWorkspaces.workspaces) {
|
||||
await this.saveWorkspace(workspace);
|
||||
}
|
||||
}
|
||||
await IOUtils.remove(oldWorkspacesPath);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue