diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-04-11 10:25:40 +0200 |
---|---|---|
committer | Colin Walters (automation) <walters+githubbot@verbum.org> | 2016-04-14 15:55:08 +0000 |
commit | b787fce6128d53eee627fea8d49b1363efd15251 (patch) | |
tree | 67ece0390ff28504b365348ec2f35a362ca8ffd7 /src/libostree/ostree-repo-prune.c | |
parent | 77ea287cd240825af311f8ac06f272b9a3981b54 (diff) | |
download | ostree-b787fce6128d53eee627fea8d49b1363efd15251.tar.gz |
Add cache_dir_fd to OstreeRepo
This will allow us later to easily swap out the cache dir.
Closes: #250
Approved by: cgwalters
Diffstat (limited to 'src/libostree/ostree-repo-prune.c')
-rw-r--r-- | src/libostree/ostree-repo-prune.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libostree/ostree-repo-prune.c b/src/libostree/ostree-repo-prune.c index 9aed0ac3..8c5d13e9 100644 --- a/src/libostree/ostree-repo-prune.c +++ b/src/libostree/ostree-repo-prune.c @@ -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) |