Commit 22ee1cf6 authored by yann300's avatar yann300

setWorkspace upon creation

parent b3f36314
...@@ -156,14 +156,14 @@ export const Workspace = (props: WorkspaceProps) => { ...@@ -156,14 +156,14 @@ export const Workspace = (props: WorkspaceProps) => {
const workspacesPath = props.workspace.workspacesPath const workspacesPath = props.workspace.workspacesPath
props.browser.createDir(workspacesPath + '/' + workspaceName, async () => { props.browser.createDir(workspacesPath + '/' + workspaceName, async () => {
await setWorkspace(workspaceName)
for (const file in props.examples) { for (const file in props.examples) {
try { try {
await props.fileManager.writeFile('browser/' + workspacesPath + '/' + workspaceName + '/' + props.examples[file].name, props.examples[file].content) await props.fileManager.writeFile(props.examples[file].name, props.examples[file].content)
} catch (error) { } catch (error) {
console.error(error) console.error(error)
} }
} }
props.plugin.getWorkspaces()
}) })
} }
......
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