Compare commits

...

1 Commits

Author SHA1 Message Date
SHL0MS
8df68d8501 fix(claw): find source files in workspace-main/ when workspace/ is empty
OpenClaw renamed workspace/ to workspace-main/ (and
workspace-{agentId} for multi-agent setups). Users who upgraded
OpenClaw before migrating to Hermes have their MEMORY.md,
USER.md, SOUL.md, skills, and other files in workspace-main/
rather than workspace/.

source_candidate() now checks workspace-main/ and
workspace-assistant/ as fallbacks when the original workspace/
path does not exist. This applies to all 12 existing callers
(memory, user profile, soul, skills, daily memory, TTS assets,
workspace instructions, and archived docs).

Refs #7847
2026-04-11 13:32:45 -04:00

View File

@@ -617,6 +617,19 @@ class Migrator:
candidate = self.source_root / rel
if candidate.exists():
return candidate
# OpenClaw renamed workspace/ to workspace-main/ (and workspace-{agentId}
# for multi-agent). Try the new path as a fallback.
if rel.startswith("workspace/"):
suffix = rel[len("workspace/"):]
for variant in ("workspace-main", "workspace-assistant"):
alt = self.source_root / variant / suffix
if alt.exists():
return alt
elif rel.startswith("workspace.default/"):
suffix = rel[len("workspace.default/"):]
alt = self.source_root / "workspace-main" / suffix
if alt.exists():
return alt
return None
def resolve_skill_destination(self, destination: Path) -> Path: