core: Allow creating tempfile without associated output stream
Just slightly more efficient, and we'll use this for spawning curl to a tempfile.
This commit is contained in:
parent
a97211e3d0
commit
ad956ff9e2
|
|
@ -1367,9 +1367,12 @@ ostree_create_temp_regular_file (GFile *dir,
|
||||||
&ret_file, cancellable, error))
|
&ret_file, cancellable, error))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
ret_stream = (GOutputStream*)g_file_append_to (ret_file, 0, cancellable, error);
|
if (out_stream)
|
||||||
if (ret_stream == NULL)
|
{
|
||||||
goto out;
|
ret_stream = (GOutputStream*)g_file_append_to (ret_file, 0, cancellable, error);
|
||||||
|
if (ret_stream == NULL)
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
ot_transfer_out_value(out_file, &ret_file);
|
ot_transfer_out_value(out_file, &ret_file);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue