Add cache_dir_fd to OstreeRepo

This will allow us later to easily swap out the cache dir.

Closes: #250
Approved by: cgwalters
This commit is contained in:
Alexander Larsson authored and Colin Walters (automation) committed 2016-04-14 15:55:08 +00:00
1 parent 77ea287cd2
commit b787fce612
4 files changed
+55 -12

No files matched your search

+4 -1
View File
@@ -125,7 +125,10 @@ _ostree_repo_prune_tmp (OstreeRepo *self,
g_auto(GLnxDirFdIterator) dfd_iter = { 0, };
glnx_fd_close int fd = -1;
fd = glnx_opendirat_with_errno (self->repo_dir_fd, _OSTREE_SUMMARY_CACHE_PATH, FALSE);
if (self->cache_dir_fd == -1)
return TRUE;
fd = glnx_opendirat_with_errno (self->cache_dir_fd, _OSTREE_SUMMARY_CACHE_DIR, FALSE);
if (fd < 0)
{
if (errno == ENOENT)