fix(memory-wiki): preserve guarded collision handling

This commit is contained in:
Vincent Koc 2026-07-01 19:41:14 -07:00
parent 5ff247b99e
commit 76db9a3376
No known key found for this signature in database

View file

@ -16,7 +16,10 @@ type VaultRoot = Awaited<ReturnType<typeof fsRoot>>;
async function readExistingImportedSourcePage(vault: VaultRoot, pagePath: string): Promise<string> {
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);
}
}