Commit 50f9286e authored by yann300's avatar yann300

improve file migration

parent 401ebef5
......@@ -29,11 +29,13 @@ export async function migrateToWorkspace (fileManager, filePanel) {
if (fileStorageBrowserWorkspace.get(flag) === 'done') return
const files = await browserProvider.copyFolderToJson('/')
console.log(files)
if (Object.keys(files).length > 0) {
const workspaceName = 'default_workspace'
const workspacePath = joinPath('browser', workspaceProvider.workspacesPath, workspaceName)
await filePanel.createWorkspace(workspaceName)
filePanel.getWorkspaces() // refresh list
await populateWorkspace(workspacePath, files, browserProvider)
}
fileStorageBrowserWorkspace.set(flag, 'done')
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment