core: Fix mkdtemp invocation
This commit is contained in:
parent
c436f8ac61
commit
a14ff0aeab
|
|
@ -1323,10 +1323,9 @@ ostree_create_temp_dir (GFile *dir,
|
||||||
if (dir == NULL)
|
if (dir == NULL)
|
||||||
dir = g_file_new_for_path (g_get_tmp_dir ());
|
dir = g_file_new_for_path (g_get_tmp_dir ());
|
||||||
|
|
||||||
template = g_strdup_printf ("%s/%s-XXXXXX-%s",
|
template = g_strdup_printf ("%s/%s-XXXXXX",
|
||||||
ot_gfile_get_path_cached (dir),
|
ot_gfile_get_path_cached (dir),
|
||||||
prefix ? prefix : "tmp",
|
prefix ? prefix : "tmp");
|
||||||
suffix ? suffix : "tmp");
|
|
||||||
|
|
||||||
if (mkdtemp (template) == NULL)
|
if (mkdtemp (template) == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,6 @@ update_initramfs (const char *release,
|
||||||
ot_lobj GFile *initramfs_tmp_file = NULL;
|
ot_lobj GFile *initramfs_tmp_file = NULL;
|
||||||
ot_lobj GFileInfo *initramfs_tmp_info = NULL;
|
ot_lobj GFileInfo *initramfs_tmp_info = NULL;
|
||||||
|
|
||||||
|
|
||||||
if (!ostree_create_temp_dir (NULL, "ostree-initramfs", NULL, &tmpdir,
|
if (!ostree_create_temp_dir (NULL, "ostree-initramfs", NULL, &tmpdir,
|
||||||
cancellable, error))
|
cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue