diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts b/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts index 7c8e66f309..8be5c1899c 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts @@ -26,7 +26,7 @@ module.exports = { 'Test Failed Import': function (browser: NightwatchBrowser) { browser.addFile('Untitled3.sol', sources[2]['Untitled3.sol']) .clickLaunchIcon('solidity') - .assert.containsText('#compileTabView .error pre', 'not found default_workspace/Untitled11.sol') + .assert.containsText('#compileTabView .error pre', 'not found Untitled11.sol') }, 'Test Github Import - from master branch': function (browser: NightwatchBrowser) { diff --git a/apps/remix-ide/src/app/panels/file-panel.js b/apps/remix-ide/src/app/panels/file-panel.js index 8e1c656fad..991108285c 100644 --- a/apps/remix-ide/src/app/panels/file-panel.js +++ b/apps/remix-ide/src/app/panels/file-panel.js @@ -218,7 +218,7 @@ module.exports = class Filepanel extends ViewPlugin { } catch (error) { console.error(error) } - }, 200) + }, 10) } } } diff --git a/libs/remix-ui/file-explorer/src/lib/actions/fileSystem.ts b/libs/remix-ui/file-explorer/src/lib/actions/fileSystem.ts index 09443366b5..8e3bc9f1c4 100644 --- a/libs/remix-ui/file-explorer/src/lib/actions/fileSystem.ts +++ b/libs/remix-ui/file-explorer/src/lib/actions/fileSystem.ts @@ -183,7 +183,7 @@ export const init = (provider, workspaceName: string, plugin, registry) => (disp if (provider) { provider.event.register('fileAdded', async (filePath) => { if (extractParentFromKey(filePath) === '/.workspaces') return - const path = extractParentFromKey(filePath) || workspaceName + const path = extractParentFromKey(filePath) || provider.workspace || provider.type || '' const data = await fetchDirectoryContent(provider, path) dispatch(fileAddedSuccess(path, data)) @@ -193,18 +193,18 @@ export const init = (provider, workspaceName: string, plugin, registry) => (disp }) provider.event.register('folderAdded', async (folderPath) => { if (extractParentFromKey(folderPath) === '/.workspaces') return - const path = extractParentFromKey(folderPath) || workspaceName + const path = extractParentFromKey(folderPath) || provider.workspace || provider.type || '' const data = await fetchDirectoryContent(provider, path) dispatch(folderAddedSuccess(path, data)) }) provider.event.register('fileRemoved', async (removePath) => { - const path = extractParentFromKey(removePath) || workspaceName + const path = extractParentFromKey(removePath) || provider.workspace || provider.type || '' dispatch(fileRemovedSuccess(path, removePath)) }) provider.event.register('fileRenamed', async (oldPath) => { - const path = extractParentFromKey(oldPath) || workspaceName + const path = extractParentFromKey(oldPath) || provider.workspace || provider.type || '' const data = await fetchDirectoryContent(provider, path) dispatch(fileRenamedSuccess(path, oldPath, data)) @@ -229,6 +229,7 @@ export const init = (provider, workspaceName: string, plugin, registry) => (disp dispatch(displayNotification('File Renamed Failed', '', 'Ok', 'Cancel')) }) provider.event.register('rootFolderChanged', async () => { + workspaceName = provider.workspace || provider.type || '' fetchDirectory(provider, workspaceName)(dispatch) }) dispatch(fetchProviderSuccess(provider))