lib/pull: Drop direct use of ->repodir
Prep for `ostree_repo_new_at()`. Down the line perhaps we should extend libcurl to accept a file descriptor for cookies, but this works OK for now. Closes: #1010 Approved by: jlebon
This commit is contained in:
parent
9430b8ad75
commit
efd460782a
|
|
@ -2697,16 +2697,16 @@ _ostree_repo_remote_new_fetcher (OstreeRepo *self,
|
|||
}
|
||||
|
||||
{
|
||||
g_autofree char *jar_path = NULL;
|
||||
g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt",
|
||||
remote_name);
|
||||
|
||||
jar_path = g_build_filename (gs_file_get_path_cached (self->repodir), cookie_file,
|
||||
NULL);
|
||||
g_autofree char *cookie_file = g_strdup_printf ("%s.cookies.txt", remote_name);
|
||||
/* TODO; port away from this; a bit hard since both libsoup and libcurl
|
||||
* expect a file. Doing ot_fdrel_to_gfile() works for now though.
|
||||
*/
|
||||
GFile*repo_path = ostree_repo_get_path (self);
|
||||
g_autofree char *jar_path =
|
||||
g_build_filename (gs_file_get_path_cached (repo_path), cookie_file, NULL);
|
||||
|
||||
if (g_file_test (jar_path, G_FILE_TEST_IS_REGULAR))
|
||||
_ostree_fetcher_set_cookie_jar (fetcher, jar_path);
|
||||
|
||||
}
|
||||
|
||||
success = TRUE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue