Skip to content

Commit

Permalink
Merge pull request #2901 from cgwalters/revert-fetcher-change
Browse files Browse the repository at this point in the history
Revert "fetcher: Always open tmpfiles in repo location"
  • Loading branch information
cgwalters authored Jun 27, 2023
2 parents 7a91035 + 4e61e6f commit 8deb97a
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 8deb97a

Please sign in to comment.