Bug 458150

Summary: writing corrupt config file when drive is full
Product: [Applications] konsole Reporter: saunders
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 22.04.3   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

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.