mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-05 21:02:42 +02:00
plug-ins: only set the file if it's actually an inner XCF file.
Soon we will officially support .hgt.zip files (see !2483) but in fact, even without this, the file-compressor actually support any other formats we support, compressed into one of the container formats supported by this plug-in. This fixes such error message: > gimp_image_set_file: failure to set file 'file:///home/jehan/Documents/gimp-splash-deleteme.png.gz' with extension 'gz'. The extension must be '.xcf' (or a compressed variant).
This commit is contained in:
@@ -526,9 +526,17 @@ load_image (const CompressorEntry *compressor,
|
||||
|
||||
if (image)
|
||||
{
|
||||
GFile *xcf_file;
|
||||
|
||||
*status = GIMP_PDB_SUCCESS;
|
||||
|
||||
gimp_image_set_file (image, file);
|
||||
if ((xcf_file = gimp_image_get_xcf_file (image)))
|
||||
/* Replace the temporary file with the actual source file, but
|
||||
* only if the inner format was actually XCF.
|
||||
*/
|
||||
gimp_image_set_file (image, file);
|
||||
|
||||
g_clear_object (&xcf_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user