From 09240fb2b276b4c880f59dd363d0ac87d4609ac0 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Wed, 14 Aug 2024 14:25:24 +0100 Subject: [PATCH] fix cut bug --- libs/remix-ui/workspace/src/lib/actions/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/remix-ui/workspace/src/lib/actions/index.ts b/libs/remix-ui/workspace/src/lib/actions/index.ts index 11de027fb9..c36aa3eb43 100644 --- a/libs/remix-ui/workspace/src/lib/actions/index.ts +++ b/libs/remix-ui/workspace/src/lib/actions/index.ts @@ -672,6 +672,7 @@ const saveAs = (blob, name) => { export const moveFile = async (src: string, dest: string) => { const fileManager = plugin.fileManager + 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) } catch (error) { @@ -682,6 +683,8 @@ export const moveFile = async (src: string, dest: string) => { export const moveFolder = async (src: string, dest: string) => { const fileManager = plugin.fileManager + 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) } catch (error) {