From e3e513ffbdb0880f925d67266de7ee4fb728c338 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 15 Aug 2024 10:45:59 +0100 Subject: [PATCH] update moveFile --- libs/remix-ui/workspace/src/lib/actions/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index c36aa3eb43..d767e8b025 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -674,7 +674,8 @@ export const moveFile = async (src: string, dest: string) => { if (src === dest) return // if you cut and paste to the same location then no need to move anything try { - await fileManager.moveFile(src, dest) + const updatedDestPath = await fileManager.currentPath() + await fileManager.moveFile(src, updatedDestPath) } catch (error) { dispatch(displayPopUp('Oops! An error occurred while performing moveFile operation.' + error)) } @@ -686,7 +687,8 @@ export const moveFolder = async (src: string, dest: string) => { if (src === dest) return // if you cut and paste to the same location then no need to move anything try { - await fileManager.moveDir(src, dest) + const updatedDestPath = await fileManager.currentPath() + await fileManager.moveDir(src, updatedDestPath) } catch (error) { dispatch(displayPopUp('Oops! An error occurred while performing moveDir operation.' + error)) }