Settings: check if writing configuration file was successful

Writing to the file stream might fail due to a immutable file or a
filesystem error.
Check the error indicator for the stream and for fclose() failures.
This commit is contained in:
Christian Göttsche
2021-03-12 16:56:06 +01:00
parent 350b48e44c
commit 521f1343e3
3 changed files with 16 additions and 8 deletions

View File

@ -87,7 +87,7 @@ static inline int Settings_getActiveDirection(const Settings* this) {
void Settings_delete(Settings* this);
bool Settings_write(const Settings* this);
int Settings_write(const Settings* this);
Settings* Settings_new(int initialCpuCount);