From 38819a9050bad40cbc5671f95408edcbc290540b Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Mon, 23 Feb 2015 12:56:47 +0000 Subject: [PATCH] better dzsave temp dir name we use the output name as the base of the temp dir name, less likely to get lost --- libvips/foreign/dzsave.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libvips/foreign/dzsave.c b/libvips/foreign/dzsave.c index 1ede8eba..37bb10de 100644 --- a/libvips/foreign/dzsave.c +++ b/libvips/foreign/dzsave.c @@ -1624,12 +1624,15 @@ vips_foreign_save_dz_build( VipsObject *object ) * the current directory and remove the temp. The temp * dir must not clash with another file. */ + char name[VIPS_PATH_MAX]; + int fd; GsfOutput *out; GError *error = NULL; - int fd; + vips_snprintf( name, VIPS_PATH_MAX, "%s-XXXXXX", + dz->basename ); dz->tempdir = g_build_filename( dz->dirname, - "dzsave-temp-XXXXXXX", NULL ); + name, NULL ); if( (fd = g_mkstemp( dz->tempdir )) == -1 ) { vips_error( class->nickname, _( "unable to make temporary file %s" ),