Commit aaeea9d1 authored by yann300's avatar yann300

fix migrating files

parent 5e9df881
......@@ -32,7 +32,7 @@ export async function migrateToWorkspace (fileManager, filePanel) {
if (Object.keys(files).length > 0) {
const workspaceName = 'default_workspace'
const workspacePath = joinPath('browser', workspaceProvider.workspacesPath, workspaceName)
await filePanel.createWorkspace(workspaceName)
await filePanel.processCreateWorkspace(workspaceName)
filePanel.getWorkspaces() // refresh list
await populateWorkspace(workspacePath, files, browserProvider)
}
......@@ -42,6 +42,7 @@ export async function migrateToWorkspace (fileManager, filePanel) {
const populateWorkspace = async (workspace, json, browserProvider) => {
for (const item in json) {
const isFolder = json[item].content === undefined
if (isFolder && item === '/.workspaces') continue // we don't want to replicate this one.
if (isFolder) {
browserProvider.createDir(joinPath(workspace, item))
await populateWorkspace(workspace, json[item].children, browserProvider)
......
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