From 73cf3876510b63e890b813ae62fc8e6ec2f51a37 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 26 Sep 2022 19:43:51 +0530 Subject: [PATCH] fix path to create and open file from home tab --- apps/remix-ide/src/app/panels/file-panel.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 71c637406b..d6a3708269 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/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) })