From 8fc591bba797c5b44426ed6f280641e8d450eb72 Mon Sep 17 00:00:00 2001 From: David Disu Date: Tue, 30 Aug 2022 12:37:18 +0100 Subject: [PATCH] Fixed failing fileExplorer test --- libs/remix-ui/workspace/src/lib/actions/events.ts | 2 +- libs/remix-ui/workspace/src/lib/actions/workspace.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/events.ts b/libs/remix-ui/workspace/src/lib/actions/events.ts index 8571890f35..74b767cf73 100644 --- a/libs/remix-ui/workspace/src/lib/actions/events.ts +++ b/libs/remix-ui/workspace/src/lib/actions/events.ts @@ -189,7 +189,7 @@ const fileRemoved = async (removePath: string) => { const fileRenamed = async (oldPath: string) => { const provider = plugin.fileManager.currentFileProvider() - const path = extractParentFromKey(oldPath) || provider.workspace || provider.type || '' + const path = extractParentFromKey(oldPath) || ROOT_PATH const promise = new Promise((resolve) => { provider.resolveDirectory(path, (error, fileTree) => { if (error) console.error(error) diff --git a/libs/remix-ui/workspace/src/lib/actions/workspace.ts b/libs/remix-ui/workspace/src/lib/actions/workspace.ts index 51305d8408..3ef203644e 100644 --- a/libs/remix-ui/workspace/src/lib/actions/workspace.ts +++ b/libs/remix-ui/workspace/src/lib/actions/workspace.ts @@ -7,6 +7,7 @@ import { checkSlash, checkSpecialChars } from '@remix-ui/helper' import { JSONStandardInput, WorkspaceTemplate } from '../types' import { QueryParams } from '@remix-project/remix-lib' import * as templateWithContent from '@remix-project/remix-ws-templates' +import { ROOT_PATH } from '../utils/constants' const LOCALHOST = ' - connect to localhost - ' @@ -346,7 +347,7 @@ export const cloneRepository = async (url: string) => { const isActive = await plugin.call('manager', 'isActive', 'dgit') if (!isActive) await plugin.call('manager', 'activatePlugin', 'dgit') - await fetchWorkspaceDirectory('/') + await fetchWorkspaceDirectory(ROOT_PATH) dispatch(cloneRepositorySuccess()) }).catch(() => { const cloneModal = {