Skip to content

Commit

Permalink
Revert "fetcher: Always open tmpfiles in repo location"
Browse files Browse the repository at this point in the history
This reverts commit f7f6f87.

This seems to have broken flatpak, so we'll revert and then
investigate.

Closes: #2900
  • Loading branch information
cgwalters authored and dbnicholson committed Jun 27, 2023
1 parent 7a91035 commit 4e61e6f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libostree/ostree-fetcher-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ static inline gboolean
_ostree_fetcher_tmpf_from_flags (OstreeFetcherRequestFlags flags, int dfd, GLnxTmpfile *tmpf,
GError **error)
{
if (!glnx_open_tmpfile_linkable_at (dfd, ".", O_RDWR | O_CLOEXEC, tmpf, error))
if ((flags & OSTREE_FETCHER_REQUEST_LINKABLE) > 0)
{
if (!glnx_open_tmpfile_linkable_at (dfd, ".", O_RDWR | O_CLOEXEC, tmpf, error))
return FALSE;
}
else if (!glnx_open_anonymous_tmpfile (O_RDWR | O_CLOEXEC, tmpf, error))
return FALSE;

if (!glnx_fchmod (tmpf->fd, 0644, error))
return FALSE;
return TRUE;
Expand Down

0 comments on commit 4e61e6f

Please sign in to comment.