mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-04 17:43:36 +00:00
fix(memory-wiki): preserve guarded collision handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user