[evolution-data-server/gnome-41] I#355 - Camel: Ignore empty output from "Pipe to program" filter
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-41] I#355 - Camel: Ignore empty output from "Pipe to program" filter
- Date: Fri, 17 Sep 2021 09:10:19 +0000 (UTC)
commit 1560b229e432768a127298cf07191fd05ed3df92
Author: Milan Crha <mcrha redhat com>
Date: Fri Sep 17 11:09:02 2021 +0200
I#355 - Camel: Ignore empty output from "Pipe to program" filter
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/355
src/camel/camel-filter-driver.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/camel/camel-filter-driver.c b/src/camel/camel-filter-driver.c
index 9df9eee9d..7553daa78 100644
--- a/src/camel/camel-filter-driver.c
+++ b/src/camel/camel-filter-driver.c
@@ -1083,6 +1083,7 @@ pipe_to_system (struct _CamelSExp *f,
CamelStream *stream, *mem;
GPid child_pid;
GError *error = NULL;
+ GByteArray *bytes;
GPtrArray *args;
child_watch_data_t child_watch_data;
GSource *source;
@@ -1157,6 +1158,11 @@ pipe_to_system (struct _CamelSExp *f,
g_object_unref (stream);
+ bytes = camel_stream_mem_get_byte_array (CAMEL_STREAM_MEM (mem));
+
+ if (!bytes || !bytes->len)
+ goto wait;
+
g_seekable_seek (G_SEEKABLE (mem), 0, G_SEEK_SET, NULL, NULL);
parser = camel_mime_parser_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]