Bug 458150 - writing corrupt config file when drive is full
Summary: writing corrupt config file when drive is full
Status: REPORTED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 22.04.3
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-21 18:01 UTC by saunders
Modified: 2022-08-21 18:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description saunders 2022-08-21 18:01:54 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. random broken program fills /home
2. konsole tries to write ~/.config/konsolerc
3. truncated file loses all previous settings

OBSERVED RESULT
konsole lost all settings

EXPECTED RESULT
konsole does not lose all settings

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.25.4
KDE Frameworks Version: 5.97.0
Qt Version: 5.15.5

ADDITIONAL INFORMATION

I know this is very much an edge case but figured I would report it anyway. I am reporting this under konsole as this is where I experienced the corruption but I assume this could happen to any app.

A random garbage program filled my /home and, I assume, konsole went to overwrite the previous existing ~/.config/konsolerc and failed in writing the full file, effectively losing all settings. 

I can't think of a real solution to this, only thing I could imagine was if /home was <1M then don't write the config. A warning popped up once it was at 0% full and offered to open filelight which was a nice touch.