add an error if we can't write the output file
[swftools.git] / src / jpeg2swf.c
index 544e7c9..b53958a 100644 (file)
@@ -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);