core: Fix mkdtemp invocation

This commit is contained in:
Colin Walters 2012-06-06 10:02:37 -04:00
parent c436f8ac61
commit a14ff0aeab
2 changed files with 2 additions and 4 deletions

View File

@ -1323,10 +1323,9 @@ ostree_create_temp_dir (GFile *dir,
if (dir == NULL)
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),
prefix ? prefix : "tmp",
suffix ? suffix : "tmp");
prefix ? prefix : "tmp");
if (mkdtemp (template) == NULL)
{

View File

@ -79,7 +79,6 @@ update_initramfs (const char *release,
ot_lobj GFile *initramfs_tmp_file = NULL;
ot_lobj GFileInfo *initramfs_tmp_info = NULL;
if (!ostree_create_temp_dir (NULL, "ostree-initramfs", NULL, &tmpdir,
cancellable, error))
goto out;