From 76db9a3376228db6a6f58cd705fc236aa697446c Mon Sep 17 00:00:00 2001 From: Vincent Koc <25068+vincentkoc@users.noreply.github.com> Date: Wed, 1 Jul 2026 19:41:14 -0700 Subject: [PATCH] fix(memory-wiki): preserve guarded collision handling --- extensions/memory-wiki/src/source-page-shared.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/extensions/memory-wiki/src/source-page-shared.ts b/extensions/memory-wiki/src/source-page-shared.ts index 7f49c0a8aa98..9597184edc49 100644 --- a/extensions/memory-wiki/src/source-page-shared.ts +++ b/extensions/memory-wiki/src/source-page-shared.ts @@ -16,7 +16,10 @@ type VaultRoot = Awaited>; async function readExistingImportedSourcePage(vault: VaultRoot, pagePath: string): Promise { try { return await vault.readText(pagePath); - } catch { + } catch (error) { + if (error instanceof FsSafeError && (error.code === "not-file" || error.code === "hardlink")) { + return ""; + } return await vault.readText(pagePath); } }