Skip to content

The agent that grows with you

fix(cli): swallow fsync errors in the openclaw EXDEV fallback

kshitijk4poor0a62610f10cc
diff --git a/optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py b/optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py
index 199ce94a0fa..098a6cc51c4 100644
--- a/optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py
+++ b/optional-skills/migration/openclaw-migration/scripts/openclaw_to_hermes.py
@@ -444,12 +444,17 @@ def dump_yaml_file(path: Path, data: Dict[str, Any]) -> None:
except OSError:
pass
# fsync the copied target so the durability claim holds on the
- # cross-device path too (mirrors utils.atomic_replace).
- target_fd = os.open(target, os.O_RDONLY)
+ # cross-device path too (mirrors utils.atomic_replace, including
+ # its swallow — a failed fsync must not report the already-copied
+ # write as failed).
try:
- os.fsync(target_fd)
- finally:
- os.close(target_fd)
+ target_fd = os.open(target, os.O_RDONLY)
+ try:
+ os.fsync(target_fd)
+ finally:
+ os.close(target_fd)
+ except OSError:
+ pass
os.unlink(tmp_path)
except BaseException:
try: