-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't trash userconfig on errors #3192
Conversation
write the user config file into a new file and rename after success. fixes launchpad bug #1881997
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Calculate a minimum size the config must have and check the seek position after flushing. Check filesize on disk with expected size.
I did some more testing and added additional sanity checks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haven't tested it yet, but code-wise LGTM so far.
@Holzhaus Ready? No issues so far. |
Ok for me. |
Thank you! LGTM |
@poelzi |
I also noticed these warnings on every shutdown:
|
ping @poelzi |
@poelzi Please take a look at the error. |
Revert for now? |
taking a look at this right now, trying to find out why it can't remove the old config. |
Hmm..suddenly it works for me here, all preferences and skin settings are saved. |
Unfortunately, I cannot reproduce the issues on Fedora and Qt 5.15. No idea what is wrong with these changes!? |
Fix is here: #3371 |
Instead of opening the current config file for write operations,
write the user config file into a new file and rename after success.
This will no longer trash the config file if the file-system is full.
fixes launchpad bug #1881997