Files
genoffice/apps
ANIRUDDHA ADAKandAniruddha Adak 4846ace175 fix(slides): serialize concurrent saves to prevent file corruption (#155)
* fix(slides): serialize concurrent saves to prevent file corruption

The save() function had no in-flight guard: double-tap Ctrl+S, a user-initiated save during the 30s autosave, or a close-save during autosave all issued overlapping slides:save IPC calls. The main-process handler writes via createWriteStream directly to the target path — two concurrent writes interleave zip streams, truncate the pptx, or fail with EPERM/EBUSY on Windows, then both completions race on the dirty flags. Queue saves behind a promise-chain tail (the same pattern as the docs save serializer and PR #149's markdown fix) so only one write runs at a time.

* fix(slides): mock UI-only imports in save-serialization test (fix canvas in CI)

---------

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
2026-09-04 12:25:58 +08:00
..