Commit Graph

2 Commits

Author SHA1 Message Date
YeonGyu-Kim 7735b2abd5 fix(shared): tolerate EPERM during fsync in writeFileAtomically
Replaces fsyncSync(tempFileDescriptor) with tolerantFsyncSync, allowing
EPERM/EACCES/ENOTSUP/EINVAL during fsync while still propagating real
errors. Adds an optional deps.fsyncSync injection point used solely by
the new EPERM tolerance regression tests.

Without this fix, plugin startup itself can fail on synced folders
because writeFileAtomically is used by config migrations and posthog
activity state — the same EPERM-on-fsync failure pattern reported for
team_create.
2026-05-08 14:09:17 +09:00
YeonGyu-Kim 7accb53cbb fix(shared): handle Windows rename-over-existing in write-file-atomically (#3222)
On Windows, renameSync fails with EPERM/EACCES when the target file
already exists. Fall back to unlink + rename on Windows permission
errors while preserving atomic semantics on other platforms.

🤖 Generated with OhMyOpenCode assistance
https://github.com/code-yeongyu/oh-my-opencode
2026-04-12 02:28:05 +09:00