Dev Tools · 1h ago
Cockatrice bug silently saves 0-byte files on full disk
A bug in the open-source Magic: The Gathering client Cockatrice causes it to report successful saves even when the disk is full, resulting in 0-byte files that destroy user data. The issue, filed as #6952, stems from three independent failures in the save routine: the file open succeeds (truncating the existing file), the write fails silently, and the success flag is never updated from its initial false value. The fix ensures the success variable is properly set and the file is only closed after a successful write.
Meridian48 take
This is a textbook example of how silent failures in file I/O can corrupt user data, and a reminder that even simple save operations need robust error handling.
bug-reportopen-source