diff --git a/apps/remix-ide/src/app/files/fileManager.js b/apps/remix-ide/src/app/files/fileManager.js index 40e7aa2fff..cc73ba0942 100644 --- a/apps/remix-ide/src/app/files/fileManager.js +++ b/apps/remix-ide/src/app/files/fileManager.js @@ -563,7 +563,6 @@ class FileManager extends Plugin { if (file.startsWith('browser')) { return this._deps.filesProviders.browser } - const provider = this._deps.filesProviders.workspace return this._deps.filesProviders.workspace } diff --git a/apps/remix-ide/src/app/files/workspaceFileProvider.js b/apps/remix-ide/src/app/files/workspaceFileProvider.js index 3a779f77bc..9d3159c283 100644 --- a/apps/remix-ide/src/app/files/workspaceFileProvider.js +++ b/apps/remix-ide/src/app/files/workspaceFileProvider.js @@ -80,8 +80,8 @@ class WorkspaceFileProvider extends FileProvider { return path.replace(this.workspacesPath + '/' + this.workspace + '/', '') } - createDefaultWorkspace() { - this.workspace = 'workspace_default' + createDefaultWorkspace () { + this.workspace = 'generated_workspace' this.event.trigger('create_workspace_default', [this.workspace]) } } diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 7e44fc2520..c76d822c94 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -175,10 +175,12 @@ module.exports = class Filepanel extends ViewPlugin { } async createNewFile () { + if (!this.workspaceExists()) this.createWorkspace('generated_workspace') return await this.request.createNewFile() } async uploadFile (event) { + if (!this.workspaceExists()) this.createWorkspace('generated_workspace') return await this.request.uploadFile(event) }