When counting blocks, ignore cryfs.config. This already worked on Linux, but not on Mac. After this commit, it is also fixed for Mac.
This commit is contained in:
parent
010833e25b
commit
285dd05072
@ -78,7 +78,9 @@ void OnDiskBlockStore::remove(unique_ref<Block> block) {
|
||||
uint64_t OnDiskBlockStore::numBlocks() const {
|
||||
uint64_t count = 0;
|
||||
for (auto entry = bf::directory_iterator(_rootdir); entry != bf::directory_iterator(); ++entry) {
|
||||
count += std::distance(bf::directory_iterator(entry->path()), bf::directory_iterator());
|
||||
if (bf::is_directory(entry->path())) {
|
||||
count += std::distance(bf::directory_iterator(entry->path()), bf::directory_iterator());
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user