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); } }