mirror of
https://github.com/xuquan-nikkkki/FolderFile-Splitter-Plugin.git
synced 2026-07-22 05:37:28 +00:00
fix: avoid renaming file/folder when moving to the original folder
This commit is contained in:
parent
024be52702
commit
be24508dff
1 changed files with 1 additions and 0 deletions
|
|
@ -71,6 +71,7 @@ const Folder = ({
|
|||
const [{ isOver }, drop] = useDrop(() => ({
|
||||
accept: ["FILE", "FOLDER"],
|
||||
drop: async (item: TFolder | TFile) => {
|
||||
if (item.path === folder.path) return;
|
||||
await moveFileOrFolder(plugin.app.fileManager, item, folder);
|
||||
if (item instanceof TFile) {
|
||||
if (focusedFolder?.path !== folder.path) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue