Check if workspace exists

pull/4460/head
yann300 10 months ago committed by Aniket
parent f95372e0c1
commit 43d3812277
  1. 6
      apps/remix-ide/src/app/files/workspaceFileProvider.js

@ -12,7 +12,11 @@ class WorkspaceFileProvider extends FileProvider {
try {
// make sure "code-sample" has been removed
window.remixFileSystem.unlink(this.workspacesPath + '/code-sample')
window.remixFileSystem.exist(this.workspacesPath + '/code-sample').then((exist) => {
if (exist) window.remixFileSystem.unlink(this.workspacesPath + '/code-sample').catch((e) => {
console.log(e)
})
})
} catch (e) {
// we don't need to log error if this throws an error
}

Loading…
Cancel
Save