[recipes] Revert "Write exported files to TMPDIR again"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [recipes] Revert "Write exported files to TMPDIR again"
- Date: Wed, 12 Jul 2017 01:48:30 +0000 (UTC)
commit ec34f9e9c717f28e227000be62eccbaaea1a4f66
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jul 11 21:46:29 2017 -0400
Revert "Write exported files to TMPDIR again"
This reverts commit 53428b6b6dc42f7a19331f20fab9204045c1e115.
With the current email portal API, we fail to attach files if
the path inside the sandbox is different from the path outside,
as is the case for TMPDIR. This will be fixed when we can rely
on the version 2 of the email portal API.
src/gr-recipe-exporter.c | 5 +++--
src/gr-recipe-printer.c | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/gr-recipe-exporter.c b/src/gr-recipe-exporter.c
index 7c21328..7131855 100644
--- a/src/gr-recipe-exporter.c
+++ b/src/gr-recipe-exporter.c
@@ -435,6 +435,7 @@ prepare_export (GrRecipeExporter *exporter,
#ifndef ENABLE_AUTOAR
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
_("This build does not support exporting"));
+
return FALSE;
#else
g_autofree char *path = NULL;
@@ -564,9 +565,9 @@ do_export (GrRecipeExporter *exporter)
g_autofree char *tmp;
if (i == 0)
- tmp = g_strdup_printf ("%s/%s.gnome-recipes-export", g_get_tmp_dir (), name);
+ tmp = g_strdup_printf ("%s/%s.gnome-recipes-export", get_user_data_dir (), name);
else
- tmp = g_strdup_printf ("%s/%s(%d).gnome-recipes-export", g_get_tmp_dir (), name, i);
+ tmp = g_strdup_printf ("%s/%s(%d).gnome-recipes-export", get_user_data_dir (), name,
i);
if (!g_file_test (tmp, G_FILE_TEST_EXISTS)) {
path = g_strdup (tmp);
diff --git a/src/gr-recipe-printer.c b/src/gr-recipe-printer.c
index a11ce97..7f9b92b 100644
--- a/src/gr-recipe-printer.c
+++ b/src/gr-recipe-printer.c
@@ -491,7 +491,7 @@ gr_recipe_printer_get_pdf (GrRecipePrinter *printer,
name = g_strdup (gr_recipe_get_name (GR_RECIPE (recipe)));
g_strdelimit (name, "./", ' ');
- path = g_strdup_printf ("%s/%s.pdf", g_get_tmp_dir (), name);
+ path = g_strdup_printf ("%s/%s.pdf", get_user_data_dir (), name);
g_set_object (&printer->recipe, recipe);
operation = gtk_print_operation_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]