Regression: Gimp.file_load with .xcf.gz file opens image with wrong path
Environment/Versions
- GIMP version: d63a94de (latest master)
- Package: built from source
- Operating System: Linux
Description of the bug
Gimp.file_load
with an .xcf.gz file opens an image with the wrong path.
Reproduction
Is the bug reproducible? Always
Reproduction steps:
- Create files
/tmp/test.xcf
and/tmp/test.xcf.gz
- Open the Python console.
- Paste the following
image = Gimp.file_load(Gimp.RunMode.NONINTERACTIVE, Gio.File.new_for_path("/tmp/test.xcf"))
Gimp.Display.new(image)
Gimp.displays_flush()
image = Gimp.file_load(Gimp.RunMode.NONINTERACTIVE, Gio.File.new_for_path("/tmp/test.xcf.gz"))
Gimp.Display.new(image)
Gimp.displays_flush()
Expected result: Two images test.xcf
and test.xcf.gz
are opened.
Actual result:
- Two images
test.xcf
andgimp-temp-59050.xcf
are opened. - Saving
gimp-temp-59050.xcf
does not overwrite/tmp/test.xcf.gz
- Message in console:
gimp_image_set_file: failure to set file 'file:///tmp/test.xcf.gz' with extension 'gz'. The extension must be '.xcf'.
Additional information
This behavior was introduced in commit fc2925de