[Debian-on-mobile-maintainers] [Git][DebianOnMobile-team/chatty][debian/latest] 2 commits: chatty-file-item: Don't assume mime type is set
Guido Günther (@agx)
gitlab at salsa.debian.org
Sat Feb 15 11:57:21 GMT 2025
Guido Günther pushed to branch debian/latest at Debian On Mobile / chatty
Commits:
2e6f48f1 by Guido Günther at 2025-02-15T12:32:52+01:00
chatty-file-item: Don't assume mime type is set
- - - - -
f3128e68 by Guido Günther at 2025-02-15T12:37:02+01:00
Document changes and release 0.8.6~rc.0-2
- - - - -
4 changed files:
- debian/changelog
- debian/patches/0001-Disable-Clock-History-and-pgp-tests.patch
- + debian/patches/chatty-file-item-Don-t-assume-mime-type-is-set.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+chatty (0.8.6~rc.0-2) unstable; urgency=medium
+
+ * chatty-file-item: Don't assume mime type is set.
+ Otherwise we crash with every matrix attachment
+ download. (Closes: #1096022)
+
+ -- Guido Günther <agx at sigxcpu.org> Sat, 15 Feb 2025 12:32:54 +0100
+
chatty (0.8.6~rc.0-1) unstable; urgency=medium
* New upstream release
=====================================
debian/patches/0001-Disable-Clock-History-and-pgp-tests.patch
=====================================
@@ -11,7 +11,7 @@ The pgp test is flaky and we don't use PGP in chatty yet
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/meson.build b/tests/meson.build
-index aa581dd..d1757ff 100644
+index 8b04342..99f1e31 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -22,11 +22,11 @@ endif
=====================================
debian/patches/chatty-file-item-Don-t-assume-mime-type-is-set.patch
=====================================
@@ -0,0 +1,41 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx at sigxcpu.org>
+Date: Wed, 11 Dec 2024 21:45:29 +0100
+Subject: chatty-file-item: Don't assume mime type is set
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+This e.g. isn't the case for matrix downloads as
+the mime type isn't yet known.
+
+This fixes a crash when saving any attachment in a matrix chat.
+
+Fixes 4e46e701 ("file-item: name vcard and vcal after contact and event name if saving")
+
+Signed-off-by: Guido Günther <agx at sigxcpu.org>
+(cherry picked from commit ce55bb6046af9ccaf9c907268d2fa794eefcd6a9)
+---
+ src/chatty-file-item.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/chatty-file-item.c b/src/chatty-file-item.c
+index fe24e0c..e4b18db 100644
+--- a/src/chatty-file-item.c
++++ b/src/chatty-file-item.c
+@@ -489,14 +489,14 @@ download_button_clicked (ChattyFileItem *self)
+ home_folder = g_file_new_build_filename (g_get_home_dir (), NULL);
+ gtk_file_dialog_set_initial_folder (dialog, home_folder);
+
+- if (strstr (chatty_file_get_mime_type (self->file), "vcard")) {
++ if (g_strcmp0 (chatty_file_get_mime_type (self->file), "vcard") == 0) {
+ g_autofree char *contact_title = NULL;
+ g_autofree char *filename = NULL;
+
+ contact_title = chatty_utils_vcard_get_contact_title (file_to_save);
+ filename = g_strdup_printf ("%s.vcf", contact_title);
+ gtk_file_dialog_set_initial_name (dialog, filename);
+- } else if (strstr (chatty_file_get_mime_type (self->file), "calendar")) {
++ } else if (g_strcmp0 (chatty_file_get_mime_type (self->file), "calendar") == 0) {
+ g_autofree char *event_title = NULL;
+ g_autofree char *filename = NULL;
+
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
0001-Disable-Clock-History-and-pgp-tests.patch
+chatty-file-item-Don-t-assume-mime-type-is-set.patch
View it on GitLab: https://salsa.debian.org/DebianOnMobile-team/chatty/-/compare/fc8d8bacd127c5ab18a6a1ace18225b82ad7daaa...f3128e684c3731545bbda9a4a110c8720e34e363
--
View it on GitLab: https://salsa.debian.org/DebianOnMobile-team/chatty/-/compare/fc8d8bacd127c5ab18a6a1ace18225b82ad7daaa...f3128e684c3731545bbda9a4a110c8720e34e363
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-on-mobile-maintainers/attachments/20250215/4162dc14/attachment-0001.htm>
More information about the Debian-on-mobile-maintainers
mailing list