Skip to content

Commit 1d5d832

Browse files
author
filip mertens
committed
Revert "fix dragging folder into ancestor"
This reverts commit 17d2347.
1 parent 17d2347 commit 1d5d832

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

apps/remix-ide/src/app/files/fileManager.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -938,16 +938,9 @@ class FileManager extends Plugin {
938938
await this._handleIsDir(src, `Cannot move ${src}. Path is not directory.`)
939939
await this._handleIsDir(dest, `Cannot move content into ${dest}. Path is not directory.`)
940940
const dirName = helper.extractNameFromKey(src)
941-
const provider = this.fileProviderOf(src)
942-
943941
if (await this.exists(dest + '/' + dirName) || src === dest) {
944942
return false
945943
}
946-
947-
if (provider.isSubDirectory(src, dest)) {
948-
this.call('notification', 'toast', recursivePasteToastMsg())
949-
return false
950-
}
951944
return true
952945
} catch (e) {
953946
console.log(e)
@@ -1005,13 +998,7 @@ class FileManager extends Plugin {
1005998
if (await this.exists(dest + '/' + dirName) || src === dest) {
1006999
throw createError({ code: 'EEXIST', message: `Cannot move ${src}. Folder already exists at destination ${dest}` })
10071000
}
1008-
const provider = this.fileProviderOf(src)
1009-
1010-
if (provider.isSubDirectory(src, dest)) {
1011-
this.call('notification', 'toast', recursivePasteToastMsg())
1012-
return false
1013-
}
1014-
await this.inDepthCopy(src, dest, dirName)
1001+
await this.copyDir(src, dest, dirName)
10151002
await this.remove(src)
10161003

10171004
} catch (e) {

0 commit comments

Comments
 (0)