Commit graph

3 commits

Author SHA1 Message Date
aakhter
453d980a41
fix(electron): harden simple store writes (#7297)
* fix: harden electron simple store writes

* fix(electron): harden simple store writes

---------

Co-authored-by: Aamer Akhter <aamer_akhter@users.noreply.bitbucket.org>
2026-04-21 15:03:30 +02:00
Johannes Millan
bbda6b1694 fix(electron): handle legacy simpleSettings directory causing EISDIR crash
In older app versions simpleSettings was stored as a directory. Reading
it as a file threw EISDIR which was caught/logged but saveSimpleStore()
would subsequently fail with an uncaught EISDIR when writing to the
same path.

- Catch EISDIR in loadSimpleStoreAll and rename legacy dir to .bak
- Catch EISDIR in saveSimpleStore, remove dir and retry write
- Replace module-level DATA_PATH with lazy getDataPath() to fix
  stale path when --user-data-dir or Snap overrides userData
- Remove debug console.log that leaked settings to stdout
- Replace console.error with electron-log for consistency

Closes #4791
2026-02-25 15:27:57 +01:00
Johannes Millan
87ad3d59b5 feat(electronSecurity): add security layer for exec commands 2023-12-17 15:05:15 +01:00