summaryrefslogtreecommitdiff
path: root/pith/detach.c
diff options
context:
space:
mode:
Diffstat (limited to 'pith/detach.c')
-rw-r--r--pith/detach.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pith/detach.c b/pith/detach.c
index 9774e1c9..4a2318e7 100644
--- a/pith/detach.c
+++ b/pith/detach.c
@@ -202,7 +202,7 @@ detach(MAILSTREAM *stream, /* c-client stream to use */
}
/* convert all text to UTF-8 */
- if(is_text & !(flags & DT_BINARY)){
+ if(is_text & !(flags & (DT_BINARY | DT_EXTERNAL))){
charset = parameter_val(body->parameter, "charset");
/*
@@ -277,6 +277,11 @@ detach(MAILSTREAM *stream, /* c-client stream to use */
|| body->type == TYPEMULTIPART)
gf_link_filter(gf_nvtnl_local, NULL);
+ if(flags & DT_EXTERNAL){
+ char i = flags & DT_ALLIMAGES ? 'i' : '\0';
+ gf_link_filter(gf_html_cid2file, (void *) &i);
+ }
+
/*
* If we're detaching a text segment and a user-defined filter may
* need to be invoked later (see below), decode the segment into