From: kramm Date: Wed, 12 Nov 2008 10:41:13 +0000 (+0000) Subject: add an error if we can't write the output file X-Git-Tag: release-0-9-0~821 X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=commitdiff_plain;h=98d547745ade4979ad9cdccf355a22ab899f9587 add an error if we can't write the output file --- diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index 544e7c9..b53958a 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -136,6 +136,9 @@ int MovieFinish(SWF * swf, TAG * t, char *sname) sname = "output.swf"; handle = open(sname, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); } + if(handle<0 && sname) { + perror(sname); + } if (swf_WriteSWF(handle, swf)<0) fprintf(stderr, "Unable to write output file: %s\n", sname);