From 2a2790c211a3e73fa541f79dcbb009bf98ff4ceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20Bu=CC=88nemann?= Date: Mon, 6 Jun 2016 01:27:16 +0200 Subject: [PATCH] Fix dzsave vips-properties path for non-dz layout This fixes a duplicate root path for the vips-properties.xml, when either the zoomify or goolgle layouts are used. Example: foo/foo/image-properties.xml -> foo/image-properties.xml --- libvips/foreign/dzsave.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libvips/foreign/dzsave.c b/libvips/foreign/dzsave.c index 3a197c7d..4aaaa47d 100644 --- a/libvips/foreign/dzsave.c +++ b/libvips/foreign/dzsave.c @@ -903,8 +903,12 @@ write_vips_meta( VipsForeignSaveDz *dz ) if( !(dump = vips__make_xml_metadata( class->nickname, save->ready )) ) return( -1 ); - out = vips_gsf_path( dz->tree, - "vips-properties.xml", dz->root_name, NULL ); + if( dz->layout == VIPS_FOREIGN_DZ_LAYOUT_DZ ) + out = vips_gsf_path( dz->tree, + "vips-properties.xml", dz->root_name, NULL ); + else + out = vips_gsf_path( dz->tree, "vips-properties.xml", NULL ); + gsf_output_write( out, strlen( dump ), (guchar *) dump ); (void) gsf_output_close( out ); g_object_unref( out );