Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/12539

Vanessafa0dfedba748
diff --git a/app/src/layout/dock/Files.ts b/app/src/layout/dock/Files.ts
index 0fb2d656d3..9b32d161c0 100644
--- a/app/src/layout/dock/Files.ts
+++ b/app/src/layout/dock/Files.ts
@@ -571,6 +571,10 @@ export class Files extends Model {
}
});
if (!isChild) {
+ // 禁止父节点移动到子节点 https://github.com/siyuan-note/siyuan/issues/12539
+ if (newElement.getAttribute("data-path").startsWith(item.dataset.path.replace(".sy", ""))) {
+ return;
+ }
selectFileElements.push(item);
fromPaths.push(dataPath);
}