#include <h/mhparse.h>
#include <h/utils.h>
#include <h/signals.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
#include <fcntl.h>
#ifdef HAVE_ICONV
# include <iconv.h>
}
if (modify_inplace) {
+ if (status != OK) unlink (outfile);
free (outfile);
outfile = NULL;
}
}
}
} else {
- status = NOTOK;
+ status = NOTOK;
}
if (status == OK) {
free_content (mp_alt);
status = NOTOK;
}
+ } else {
+ status = NOTOK;
}
+ } else {
+ status = NOTOK;
}
}
break;
if (decode_part (ct) == OK && ct->c_cefile.ce_file) {
if ((ct_encoding = content_encoding (ct)) == CE_BINARY &&
encoding != CE_BINARY) {
+ /* The decoding isn't acceptable so discard it.
+ Leave status as OK to allow other transformations. */
if (verbosw) {
report (ct->c_partno, ct->c_file,
"will not decode%s because it is binary",
unlink (ct->c_cefile.ce_file);
free (ct->c_cefile.ce_file);
ct->c_cefile.ce_file = NULL;
- } else if (ct->c_encoding == CE_QUOTED &&
+ } else if (ct->c_encoding == CE_QUOTED &&
ct_encoding == CE_8BIT && encoding == CE_7BIT) {
+ /* The decoding isn't acceptable so discard it.
+ Leave status as OK to allow other transformations. */
if (verbosw) {
report (ct->c_partno, ct->c_file,
"will not decode%s because it is 8bit",
}
free (infile);
+ } else {
+ status = NOTOK;
}
} else {
/* No modifications and didn't need the tmp outfile. */