repo: Fix temporary directory allocation

We looked for and locked old temporary directories so we can
reuse them if not in use. However, once we found one that
we can reuse we didn't stop iterating, and eventually we
reached the end. This means we can lock multiple dirs.

Closes: #273
Approved by: giuseppe
This commit is contained in:
Alexander Larsson authored and Colin Walters (automation) committed 2016-04-22 08:46:53 +00:00
1 parent 8609cb036b
commit ad019def9a
1 file changed
+1 -1
+1 -1
View File
@@ -5012,7 +5012,7 @@ _ostree_repo_allocate_tmpdir (int tmpdir_dfd,
if (!glnx_dirfd_iterator_init_at (tmpdir_dfd, ".", FALSE, &dfd_iter, error))
return FALSE;
while (TRUE)
while (tmpdir_name == NULL)
{
gs_dirfd_iterator_cleanup GSDirFdIterator child_dfd_iter = { 0, };
struct dirent *dent;