File tree Expand file tree Collapse file tree 4 files changed +10
-3
lines changed
Expand file tree Collapse file tree 4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ started 8.3.1 on 19/5/16
22- disable debug by default, thanks Benjamin
33- configure changes to help win64
44- fix middle-drag in ws and image view
5+ - be more careful about the name of the image file we remove on close
56
67started 8.3.0 on 28/3/16
78- move path search stuff into _convert from _magick
Original file line number Diff line number Diff line change @@ -492,11 +492,15 @@ imageinfo_finalize( GObject *gobject )
492492 IM_FREEF ( im_close , imageinfo -> mapped_im );
493493 IM_FREEF ( im_close , imageinfo -> identity_lut );
494494
495- if ( imageinfo -> dfile && isfile ) {
496- unlinkf ( "%s" , name );
495+ if ( imageinfo -> dfile &&
496+ imageinfo -> delete_name &&
497+ isfile ) {
498+ unlinkf ( "%s" , imageinfo -> delete_name );
497499 iobject_changed ( IOBJECT ( main_imageinfogroup ) );
498500 }
499501
502+ VIPS_FREE ( imageinfo -> delete_name );
503+
500504 MANAGED_UNREF ( imageinfo -> underlying );
501505
502506 imageinfo_undo_free ( imageinfo );
@@ -626,6 +630,7 @@ imageinfo_init( Imageinfo *imageinfo )
626630 imageinfo -> proxy = NULL ;
627631
628632 imageinfo -> dfile = FALSE;
633+ imageinfo -> delete_name = NULL ;
629634 imageinfo -> from_file = FALSE;
630635 imageinfo -> mtime = 0 ;
631636 imageinfo -> exprs = NULL ;
@@ -812,6 +817,7 @@ imageinfo_new_temp( Imageinfogroup *imageinfogroup,
812817 return ( NULL );
813818 }
814819 imageinfo -> dfile = TRUE;
820+ VIPS_SETSTR ( imageinfo -> delete_name , tname );
815821
816822 return ( imageinfo );
817823}
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ struct _Imageinfo {
121121 Imageinfoproxy * proxy ; /* Proxy for IMAGE callbacks */
122122
123123 gboolean dfile ; /* delete_file on final close */
124+ char * delete_name ; /* the filename we unlink */
124125
125126 gboolean from_file ; /* Set if ->name is a user file */
126127 time_t mtime ; /* What mtime was when we loaded this file */
Original file line number Diff line number Diff line change @@ -147,7 +147,6 @@ extern int statfs();
147147#include <goffice/graph/gog-legend.h>
148148#include <goffice/graph/gog-chart-map.h>
149149
150- #include <goffice/gtk/go-graph-widget.h>
151150
152151#include <goffice/utils/go-color.h>
153152#include <goffice/utils/go-marker.h>
You can’t perform that action at this time.
0 commit comments