Commit 33d93360 authored by Jehan's avatar Jehan

app: gimp_get_temp_file() / gimp_temp_name() should create tmp/ if...

... it doesn't exist.
The tmp/ dir in the config folder should already be created by GIMP, but
just in case it is not there, try and create it, since all code calling
these assumes that it exists.
parent 08cc3727
......@@ -1183,6 +1183,13 @@ gimp_get_temp_file (Gimp *gimp,
dir = gimp_file_new_for_config_path (GIMP_GEGL_CONFIG (gimp->config)->temp_path,
if (! g_file_query_exists (dir, NULL))
/* Try to make the temp directory if it doesn't exist.
* Ignore any error.
g_file_make_directory_with_parents (dir, NULL, NULL);
file = g_file_get_child (dir, basename);
g_free (basename);
g_object_unref (dir);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment