mirror of https://github.com/GNOME/gimp.git
app: more GFile stuff in gimp_get_temp_file()
This commit is contained in:
parent
85668c8e69
commit
1155b9c7a7
|
@ -1357,9 +1357,9 @@ gimp_get_temp_file (Gimp *gimp,
|
||||||
{
|
{
|
||||||
static gint id = 0;
|
static gint id = 0;
|
||||||
static gint pid;
|
static gint pid;
|
||||||
gchar *filename;
|
|
||||||
gchar *basename;
|
gchar *basename;
|
||||||
gchar *path;
|
gchar *path;
|
||||||
|
GFile *dir;
|
||||||
GFile *file;
|
GFile *file;
|
||||||
|
|
||||||
g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
|
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,
|
path = gimp_config_path_expand (GIMP_GEGL_CONFIG (gimp->config)->temp_path,
|
||||||
TRUE, NULL);
|
TRUE, NULL);
|
||||||
|
|
||||||
filename = g_build_filename (path, basename, NULL);
|
dir = g_file_new_for_path (path);
|
||||||
|
|
||||||
g_free (path);
|
g_free (path);
|
||||||
|
|
||||||
|
file = g_file_get_child (dir, basename);
|
||||||
g_free (basename);
|
g_free (basename);
|
||||||
|
g_object_unref (dir);
|
||||||
file = g_file_new_for_path (filename);
|
|
||||||
|
|
||||||
g_free (filename);
|
|
||||||
|
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue