"Save selection to file" in Error console empties existing files
Environment/Versions
- GIMP version: 2.10.36, present in GIMP_2_99_18-357-g3001c2d5
- Package: Flatpak and built from source
- Operating System: Linux
Description of the bug
Found when trying to solve #10828.
Save Selection to file
in the Error console works fine when it is creating a new file. For existing files, however, it empties the files without filling them with the selection.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Do something to fill error console, e.g try to open a txt
- Select part of the error console, choose "Save selection to file"
- Select a file, click OK
- The file is now zero bytes and empty …
Expected result: File contents to be replaced with the selection
Actual result: File is emptied