fix path to create and open file from home tab

pull/2943/head
Aniket-Engg 2 years ago
parent c2989f43ba
commit 73cf387651
  1. 10
      apps/remix-ide/src/app/panels/file-panel.js

@ -102,10 +102,7 @@ module.exports = class Filepanel extends ViewPlugin {
createNewFile () {
return new Promise((resolve, reject) => {
const provider = this.fileManager.currentFileProvider()
const dir = provider.workspace || '/'
this.emit('createNewFileInputReducerEvent', dir, (err, data) => {
this.emit('createNewFileInputReducerEvent', '/', (err, data) => {
if (err) reject(err)
else resolve(data)
})
@ -114,10 +111,7 @@ module.exports = class Filepanel extends ViewPlugin {
uploadFile (target) {
return new Promise((resolve, reject) => {
const provider = this.fileManager.currentFileProvider()
const dir = provider.workspace || '/'
return this.emit('uploadFileReducerEvent', dir, target, (err, data) => {
return this.emit('uploadFileReducerEvent', '/', target, (err, data) => {
if (err) reject(err)
else resolve(data)
})

Loading…
Cancel
Save