[gimp] app: more GFile stuff in gimp_get_temp_file()
- From: Michael Natterer <mitch src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gimp] app: more GFile stuff in gimp_get_temp_file()
 
- Date: Tue, 29 Jul 2014 14:38:52 +0000 (UTC)
 
commit 1155b9c7a76c48bdf63de804666e260eb1890200
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jul 29 16:32:08 2014 +0200
    app: more GFile stuff in gimp_get_temp_file()
 app/core/gimp.c |   12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/app/core/gimp.c b/app/core/gimp.c
index b199f2f..65d71bb 100644
--- a/app/core/gimp.c
+++ b/app/core/gimp.c
@@ -1357,9 +1357,9 @@ gimp_get_temp_file (Gimp        *gimp,
 {
   static gint  id = 0;
   static gint  pid;
-  gchar       *filename;
   gchar       *basename;
   gchar       *path;
+  GFile       *dir;
   GFile       *file;
 
   g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
@@ -1375,14 +1375,12 @@ gimp_get_temp_file (Gimp        *gimp,
   path = gimp_config_path_expand (GIMP_GEGL_CONFIG (gimp->config)->temp_path,
                                   TRUE, NULL);
 
-  filename = g_build_filename (path, basename, NULL);
-
+  dir = g_file_new_for_path (path);
   g_free (path);
-  g_free (basename);
 
-  file = g_file_new_for_path (filename);
-
-  g_free (filename);
+  file = g_file_get_child (dir, basename);
+  g_free (basename);
+  g_object_unref (dir);
 
   return file;
 }
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]