repo: Delete the last use of GFile tmp_dir
The keyring isn't large, so let's just fall back to copying it rather than requiring `renameat()`. Prep for `ostree_repo_open_at()`. Closes: #821 Approved by: jlebon
This commit is contained in:
1 parent
8d8f06f21b
commit
4f80548454
5 files changed
+12
-35
No files matched your search
@@ -67,7 +67,6 @@ ot_gpgme_error_to_gio_error (gpgme_error_t gpg_error,
|
||||
|
||||
gboolean
|
||||
ot_gpgme_ctx_tmp_home_dir (gpgme_ctx_t gpgme_ctx,
|
||||
const char *tmp_dir,
|
||||
char **out_tmp_home_dir,
|
||||
GOutputStream **out_pubring_stream,
|
||||
GCancellable *cancellable,
|
||||
@@ -85,10 +84,7 @@ ot_gpgme_ctx_tmp_home_dir (gpgme_ctx_t gpgme_ctx,
|
||||
* and hand the caller an open output stream to concatenate necessary
|
||||
* keyring files. */
|
||||
|
||||
if (tmp_dir == NULL)
|
||||
tmp_dir = g_get_tmp_dir ();
|
||||
|
||||
tmp_home_dir = g_build_filename (tmp_dir, "ostree-gpg-XXXXXX", NULL);
|
||||
tmp_home_dir = g_build_filename (g_get_tmp_dir (), "ostree-gpg-XXXXXX", NULL);
|
||||
|
||||
if (mkdtemp (tmp_home_dir) == NULL)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,6 @@ GLNX_DEFINE_CLEANUP_FUNCTION0(gpgme_ctx_t, ot_cleanup_gpgme_ctx, gpgme_release)
|
||||
void ot_gpgme_error_to_gio_error (gpgme_error_t gpg_error, GError **error);
|
||||
|
||||
gboolean ot_gpgme_ctx_tmp_home_dir (gpgme_ctx_t gpgme_ctx,
|
||||
const char *tmp_dir,
|
||||
char **out_tmp_home_dir,
|
||||
GOutputStream **out_pubring_stream,
|
||||
GCancellable *cancellable,
|
||||
|
||||
Reference in new issue
Block a user