Skip to content

Commit

Permalink
astroid: apply upstream patch to prevent crashes while adding attachm…
Browse files Browse the repository at this point in the history
…ents
  • Loading branch information
bitmeise authored and classabbyamp committed Jan 24, 2024
1 parent c459238 commit 6ba6e2b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions srcpkgs/astroid/patches/attachements.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
From 7fd64c41435a2b99fb9e0a5770a83ba30cd11450 Mon Sep 17 00:00:00 2001
From: "Stephan C. Buchert" <scb@irfu.se>
Date: Wed, 14 Jun 2023 17:44:05 +0200
Subject: [PATCH] compose_message: to load as byte array, 'file' must be
wrapped with copy.

---
src/compose_message.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/compose_message.cc b/src/compose_message.cc
index 189c20f99..329481f40 100644
--- a/src/compose_message.cc
+++ b/src/compose_message.cc
@@ -781,7 +781,7 @@ namespace Astroid {

} else {
/* load into byte array */
- refptr<Gio::File> fle = Glib::wrap (file, false);
+ refptr<Gio::File> fle = Glib::wrap (file, true);
refptr<Gio::FileInputStream> istr = fle->read ();

refptr<Glib::Bytes> b;
2 changes: 1 addition & 1 deletion srcpkgs/astroid/template
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Template file for 'astroid'
pkgname=astroid
version=0.16
revision=11
revision=12
build_style=cmake
build_helper=gir
hostmakedepends="pkg-config scdoc protobuf gobject-introspection"
Expand Down

0 comments on commit 6ba6e2b

Please sign in to comment.