aboutsummaryrefslogtreecommitdiffstats
path: root/em-format/e-mail-formatter-error.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2014-03-11 00:45:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2014-03-11 00:45:17 +0800
commit130b1b00ece4ec57b8d0fcfcee1bdf508d709736 (patch)
tree1d571c4231cefb646f8175da3da8e1081a8c6552 /em-format/e-mail-formatter-error.c
parent23b50a0b990d78781c1064c79fbca69b432e95da (diff)
downloadgsoc2013-evolution-130b1b00ece4ec57b8d0fcfcee1bdf508d709736.tar
gsoc2013-evolution-130b1b00ece4ec57b8d0fcfcee1bdf508d709736.tar.gz
gsoc2013-evolution-130b1b00ece4ec57b8d0fcfcee1bdf508d709736.tar.bz2
gsoc2013-evolution-130b1b00ece4ec57b8d0fcfcee1bdf508d709736.tar.lz
gsoc2013-evolution-130b1b00ece4ec57b8d0fcfcee1bdf508d709736.tar.xz
gsoc2013-evolution-130b1b00ece4ec57b8d0fcfcee1bdf508d709736.tar.zst
gsoc2013-evolution-130b1b00ece4ec57b8d0fcfcee1bdf508d709736.zip
Don't close base stream when destroying a CamelFilterOutputStream.
GFilterOutputStream, from which CamelFilterOutputStream is derived, defaults to closing its base stream when the instance is finalized. That makes sense in the general case, but CamelFilterOutputStreams are usually temporary wrappers on a more permanent base stream, so we need to remember to override the default "close-base-stream" property value. I was tempted to just make CamelFilterOutputStream override the default automatically, but I decided against it because my long term plan is to drop CamelFilterOutputStream for GConverterOutputStream which also does not override the "close-base-stream" default. The closer the semantics of the two classes match, the easier porting will be in the future.
Diffstat (limited to 'em-format/e-mail-formatter-error.c')
-rw-r--r--em-format/e-mail-formatter-error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/em-format/e-mail-formatter-error.c b/em-format/e-mail-formatter-error.c
index 117fcd6e03..10993d79e3 100644
--- a/em-format/e-mail-formatter-error.c
+++ b/em-format/e-mail-formatter-error.c
@@ -78,6 +78,8 @@ emfe_error_format (EMailFormatterExtension *extension,
CAMEL_MIME_FILTER_TOHTML_CONVERT_NL |
CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0);
filtered_stream = camel_filter_output_stream_new (stream, filter);
+ g_filter_output_stream_set_close_base_stream (
+ G_FILTER_OUTPUT_STREAM (filtered_stream), FALSE);
g_object_unref (filter);
camel_data_wrapper_decode_to_output_stream_sync (