From 1d5d8329241f6e37ef2e39fc430872f7520a796c Mon Sep 17 00:00:00 2001 From: filip mertens Date: Wed, 27 Sep 2023 19:26:25 +0200 Subject: [PATCH] Revert "fix dragging folder into ancestor" This reverts commit 17d2347183e29646682ed73a8912f0394c2e4e45. --- apps/remix-ide/src/app/files/fileManager.ts | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/apps/remix-ide/src/app/files/fileManager.ts b/apps/remix-ide/src/app/files/fileManager.ts index 00ecb3b4e0..0a80758214 100644 --- a/apps/remix-ide/src/app/files/fileManager.ts +++ b/apps/remix-ide/src/app/files/fileManager.ts @@ -938,16 +938,9 @@ class FileManager extends Plugin { await this._handleIsDir(src, `Cannot move ${src}. Path is not directory.`) await this._handleIsDir(dest, `Cannot move content into ${dest}. Path is not directory.`) const dirName = helper.extractNameFromKey(src) - const provider = this.fileProviderOf(src) - if (await this.exists(dest + '/' + dirName) || src === dest) { return false } - - if (provider.isSubDirectory(src, dest)) { - this.call('notification', 'toast', recursivePasteToastMsg()) - return false - } return true } catch (e) { console.log(e) @@ -1005,13 +998,7 @@ class FileManager extends Plugin { if (await this.exists(dest + '/' + dirName) || src === dest) { throw createError({ code: 'EEXIST', message: `Cannot move ${src}. Folder already exists at destination ${dest}` }) } - const provider = this.fileProviderOf(src) - - if (provider.isSubDirectory(src, dest)) { - this.call('notification', 'toast', recursivePasteToastMsg()) - return false - } - await this.inDepthCopy(src, dest, dirName) + await this.copyDir(src, dest, dirName) await this.remove(src) } catch (e) {