[recipes] Write exported files to TMPDIR again



commit 53428b6b6dc42f7a19331f20fab9204045c1e115
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Jun 27 19:41:09 2017 -0400

    Write exported files to TMPDIR again
    
    We stopped doing that when it was important that the
    files survive beyond the lifetime of the application.
    Now that we are exporting by email, that is no longer
    the case.

 src/gr-recipe-exporter.c |    5 ++---
 src/gr-recipe-printer.c  |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/gr-recipe-exporter.c b/src/gr-recipe-exporter.c
index 7131855..7c21328 100644
--- a/src/gr-recipe-exporter.c
+++ b/src/gr-recipe-exporter.c
@@ -435,7 +435,6 @@ 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;
@@ -565,9 +564,9 @@ do_export (GrRecipeExporter *exporter)
                 g_autofree char *tmp;
 
                 if (i == 0)
-                        tmp = g_strdup_printf ("%s/%s.gnome-recipes-export", get_user_data_dir (), name);
+                        tmp = g_strdup_printf ("%s/%s.gnome-recipes-export", g_get_tmp_dir (), name);
                 else
-                        tmp = g_strdup_printf ("%s/%s(%d).gnome-recipes-export", get_user_data_dir (), name, 
i);
+                        tmp = g_strdup_printf ("%s/%s(%d).gnome-recipes-export", g_get_tmp_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 7f9b92b..a11ce97 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", get_user_data_dir (), name);
+        path = g_strdup_printf ("%s/%s.pdf", g_get_tmp_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]