mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-10 00:11:19 +00:00
fix(memory-wiki): preserve guarded collision handling
This commit is contained in:
parent
5ff247b99e
commit
76db9a3376
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue