[evolution/gnome-42] I#1850 - Flatpak: Attachments cannot be opened



commit 44cec8e9508a076fcc58d73b99c6a81823887d21
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 1 12:09:45 2022 +0200

    I#1850 - Flatpak: Attachments cannot be opened
    
    Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1850

 flatpak/org.gnome.Evolution-master.json | 3 +++
 flatpak/org.gnome.Evolution-stable.json | 3 +++
 src/e-util/e-mktemp.c                   | 4 +++-
 src/mail/e-mail-display.c               | 2 +-
 4 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/flatpak/org.gnome.Evolution-master.json b/flatpak/org.gnome.Evolution-master.json
index e4ace97503..6ce28e4188 100644
--- a/flatpak/org.gnome.Evolution-master.json
+++ b/flatpak/org.gnome.Evolution-master.json
@@ -369,6 +369,9 @@
                {
                        "name": "evolution",
                        "buildsystem": "cmake-ninja",
+                       "build-options" : {
+                               "cflags": "-DTEMP_HOME=1"
+                       },
                        "config-opts": [
                                "-DENABLE_AUTOAR=OFF",
                                "-DENABLE_CONTACT_MAPS=OFF",
diff --git a/flatpak/org.gnome.Evolution-stable.json b/flatpak/org.gnome.Evolution-stable.json
index 623d8d9fba..939fdbb1eb 100644
--- a/flatpak/org.gnome.Evolution-stable.json
+++ b/flatpak/org.gnome.Evolution-stable.json
@@ -368,6 +368,9 @@
                {
                        "name": "evolution",
                        "buildsystem": "cmake-ninja",
+                       "build-options" : {
+                               "cflags": "-DTEMP_HOME=1"
+                       },
                        "config-opts": [
                                "-DENABLE_AUTOAR=OFF",
                                "-DENABLE_CONTACT_MAPS=OFF",
diff --git a/src/e-util/e-mktemp.c b/src/e-util/e-mktemp.c
index 2053604337..e0837d2964 100644
--- a/src/e-util/e-mktemp.c
+++ b/src/e-util/e-mktemp.c
@@ -38,7 +38,9 @@
 
 #define d(x)
 
-/* define to put temporary files in ~/evolution/cache/tmp */
+/* define to put temporary files in ~/.cache/evolution/tmp/ */
+/* Keep this for Flatpak builds, until glib allows access to in-sandbox /tmp
+   See https://gitlab.gnome.org/GNOME/glib/-/issues/2235 for more information */
 /* #define TEMP_HOME */
 
 /* how old things need to be to expire */
diff --git a/src/mail/e-mail-display.c b/src/mail/e-mail-display.c
index fabe6f9c94..cc38c65957 100644
--- a/src/mail/e-mail-display.c
+++ b/src/mail/e-mail-display.c
@@ -787,7 +787,7 @@ mail_display_open_attachment (EMailDisplay *display,
                        attachment, default_app, (GAsyncReadyCallback)
                        e_attachment_open_handle_error, parent);
 
-               g_object_unref (default_app);
+               g_clear_object (&default_app);
        } else {
                /* ...or save it */
                GList *attachments;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]