[geary/cherry-pick-8f4e573e] Merge branch 'mjog/692-dont-serialise-empty-array' into 'mainline'
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/cherry-pick-8f4e573e] Merge branch 'mjog/692-dont-serialise-empty-array' into 'mainline'
- Date: Mon, 23 Mar 2020 10:33:26 +0000 (UTC)
commit 94a84b5d275202fd9d8601b68129b4a9fd087325
Author: Michael Gratton <mike vee net>
Date: Mon Mar 23 10:31:54 2020 +0000
Merge branch 'mjog/692-dont-serialise-empty-array' into 'mainline'
Geary.Imap.Serializer: Don't try to serialise empty literal data
Closes #692
See merge request GNOME/geary!453
(cherry picked from commit 8f4e573ef64aaa097a7e085614771bb925e194b4)
2826bf0a Geary.Imap.Serializer: Don't try to serialise empty literal data
src/engine/imap/transport/imap-serializer.vala | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/src/engine/imap/transport/imap-serializer.vala b/src/engine/imap/transport/imap-serializer.vala
index 36dafca9..549391fc 100644
--- a/src/engine/imap/transport/imap-serializer.vala
+++ b/src/engine/imap/transport/imap-serializer.vala
@@ -106,12 +106,14 @@ public class Geary.Imap.Serializer : BaseObject {
public async void push_literal_data(uint8[] buffer,
GLib.Cancellable? cancellable = null)
throws GLib.Error {
- yield this.output.write_all_async(
- buffer,
- Priority.DEFAULT,
- cancellable,
- null
- );
+ if (buffer.length > 0) {
+ yield this.output.write_all_async(
+ buffer,
+ Priority.DEFAULT,
+ cancellable,
+ null
+ );
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]