fix: avoid renaming file/folder when moving to the original folder

This commit is contained in:
Xu Quan 2025-03-01 15:21:16 +08:00
parent 024be52702
commit be24508dff

View file

@ -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) {