Description
In settingsStore.js, the save() and saveProfiles() functions write configuration data to the filesystem using synchronous calls (fs.writeFileSync). If the disk is full, file permissions are read-only, or the file is locked, these operations throw unhandled exceptions, causing the Electron process to crash or stall without presenting a helpful error to the user.
Steps to Reproduce
- Locate the Paraline user data directory containing the settings files (
settings.json, themeProfiles.json).
- Restrict file permissions for these files or their parent folder to read-only.
- Open the Settings window in Paraline and attempt to toggle a setting or save a new theme profile.
- Observe that the settings UI freezes or throws uncaught exceptions in the console.
Expected Behaviour
The save methods in the settings store should catch filesystem write errors gracefully, log them, and return a failure status so that the frontend can inform the user that changes could not be written to disk.
Actual Behaviour
Unhandled exceptions are thrown on write failures, leading to unstable application states.
Description
In
settingsStore.js, thesave()andsaveProfiles()functions write configuration data to the filesystem using synchronous calls (fs.writeFileSync). If the disk is full, file permissions are read-only, or the file is locked, these operations throw unhandled exceptions, causing the Electron process to crash or stall without presenting a helpful error to the user.Steps to Reproduce
settings.json,themeProfiles.json).Expected Behaviour
The
savemethods in the settings store should catch filesystem write errors gracefully, log them, and return a failure status so that the frontend can inform the user that changes could not be written to disk.Actual Behaviour
Unhandled exceptions are thrown on write failures, leading to unstable application states.