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

Loading…
Cancel
Save