core: Clean up temporary file creation
Use new libgsystem API, don't expose the repo's tmpdir.
This commit is contained in:
1 parent
9e480cd6a9
commit
71c4ea67f7
7 files changed
+12
-68
No files matched your search
@@ -1364,37 +1364,6 @@ ostree_create_temp_file_from_input (GFile *dir,
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ostree_create_temp_regular_file (GFile *dir,
|
||||
const char *prefix,
|
||||
const char *suffix,
|
||||
GFile **out_file,
|
||||
GOutputStream **out_stream,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
gboolean ret = FALSE;
|
||||
gs_unref_object GFile *ret_file = NULL;
|
||||
gs_unref_object GOutputStream *ret_stream = NULL;
|
||||
|
||||
if (!ostree_create_temp_file_from_input (dir, prefix, suffix, NULL, NULL, NULL,
|
||||
&ret_file, cancellable, error))
|
||||
goto out;
|
||||
|
||||
if (out_stream)
|
||||
{
|
||||
ret_stream = (GOutputStream*)g_file_append_to (ret_file, 0, cancellable, error);
|
||||
if (ret_stream == NULL)
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret = TRUE;
|
||||
ot_transfer_out_value(out_file, &ret_file);
|
||||
ot_transfer_out_value(out_stream, &ret_stream);
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
gboolean
|
||||
ostree_create_temp_dir (GFile *dir,
|
||||
const char *prefix,
|
||||
|
||||
Reference in new issue
Block a user