fetcher: Lazily create tmp directory

The tmp directory is lazily created for each fetcher instance, since
it may require superuser permissions and some instances only need
_ostree_fetcher_request_uri_to_membuf() which keeps everything in
memory buffers.
This commit is contained in:
Matthew Barnes authored and Colin Walters committed 2015-12-19 09:21:22 -05:00
1 parent 1810de2b51
commit 1f1bfbf711
3 files changed
+38 -34

No files matched your search

+1 -3
View File
@@ -419,9 +419,7 @@ _ostree_repo_remote_new_fetcher (OstreeRepo *self,
if (tls_permissive)
fetcher_flags |= OSTREE_FETCHER_FLAGS_TLS_PERMISSIVE;
fetcher = _ostree_fetcher_new (self->tmp_dir_fd, fetcher_flags, NULL, error);
if (fetcher == NULL)
goto out;
fetcher = _ostree_fetcher_new (self->tmp_dir_fd, fetcher_flags);
{
g_autofree char *tls_client_cert_path = NULL;