From 98d547745ade4979ad9cdccf355a22ab899f9587 Mon Sep 17 00:00:00 2001 From: kramm Date: Wed, 12 Nov 2008 10:41:13 +0000 Subject: [PATCH] add an error if we can't write the output file --- src/jpeg2swf.c | 3 +++ 1 file changed, 3 insertions(+) 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); -- 1.7.10.4