From ad019def9a43c0cf10526f575a32f84c0c71ee78 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 22 Apr 2016 09:29:59 +0200 Subject: [PATCH] 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 --- src/libostree/ostree-repo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c index 875c9480..35bc3a5d 100644 --- a/src/libostree/ostree-repo.c +++ b/src/libostree/ostree-repo.c @@ -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;