- /* Something went wrong. Output might be expected, such as if this were run
- as a filter. Just copy the input to the output. */
- if (copy_input_to_output (file, outfile) != OK) {
- advise (NULL, "unable to copy message to %s, it might be lost\n", outfile);
+ /* Something went wrong. Output might be expected, such as if
+ this were run as a filter. Just copy the input to the
+ output. */
+ if ((infp = fopen (file, "r")) == NULL) {
+ adios (file, "unable to open for reading");
+ }
+
+ if (copy_input_to_output (file, infp, outfile, outfp) != OK) {
+ advise (NULL, "unable to copy message to %s, "
+ "it might be lost\n", outfile);