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 = {