From: <mar...@us...> - 2010-04-01 21:29:02
|
Revision: 12884 http://gphoto.svn.sourceforge.net/gphoto/?rev=12884&view=rev Author: marcusmeissner Date: 2010-04-01 21:28:55 +0000 (Thu, 01 Apr 2010) Log Message: ----------- delete temp files on failure Modified Paths: -------------- trunk/gphoto2/gphoto2/actions.c Modified: trunk/gphoto2/gphoto2/actions.c =================================================================== --- trunk/gphoto2/gphoto2/actions.c 2010-03-31 15:26:56 UTC (rev 12883) +++ trunk/gphoto2/gphoto2/actions.c 2010-04-01 21:28:55 UTC (rev 12884) @@ -937,14 +937,16 @@ #endif if (r < 0) { gp_file_unref (file); + unlink (tmpname); return (r); } r = save_camera_file_to_file (NULL, "capture_preview", GP_FILE_TYPE_NORMAL, file, tmpfilename); gp_file_unref (file); - if (r < 0) + if (r < 0) { + unlink (tmpname); return (r); - + } return (GP_OK); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |