[geary: 3/10] Cleanup inefficient GMime stream creation for attachment !343
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 3/10] Cleanup inefficient GMime stream creation for attachment !343
- Date: Sun, 17 Nov 2019 05:52:14 +0000 (UTC)
commit 366b0adbf9691ea091142606080cdc31f734e940
Author: Chris Heywood <15127-creywood users noreply gitlab gnome org>
Date: Sat Oct 26 19:08:13 2019 +0200
Cleanup inefficient GMime stream creation for attachment !343
src/engine/rfc822/rfc822-message.vala | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/engine/rfc822/rfc822-message.vala b/src/engine/rfc822/rfc822-message.vala
index 6cfd6658..bafa431e 100644
--- a/src/engine/rfc822/rfc822-message.vala
+++ b/src/engine/rfc822/rfc822-message.vala
@@ -476,12 +476,9 @@ public class Geary.RFC822.Message : BaseObject, EmailHeaderSet {
GMime.Part part = new GMime.Part();
part.set_disposition(disposition.serialize());
part.set_filename(basename);
-
part.set_content_type(content_type);
- // TODO seems inefficient, surely there's a way to create a Glib.Stream using, say Memory.Buffer's
InputStream.
- GMime.StreamMem stream = new GMime.StreamMem.with_buffer(buffer.get_uint8_array());
- stream.set_owner(false);
+ GMime.StreamMem stream = Utils.create_stream_mem(buffer);
return yield finalise_attachment_part(stream, part, content_type, cancellable);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]