From 6caa0e0d17b74135bf50e73c997c4f37bf6942c2 Mon Sep 17 00:00:00 2001 From: Richard Schneider Date: Sat, 27 Jul 2019 13:57:26 +1200 Subject: [PATCH] fix(BlockRepositoryApi): stats on blocks #129 --- src/CoreApi/BlockApi.cs | 2 +- src/CoreApi/BlockRepositoryApi.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/CoreApi/BlockApi.cs b/src/CoreApi/BlockApi.cs index b2150703..37b8a9e9 100644 --- a/src/CoreApi/BlockApi.cs +++ b/src/CoreApi/BlockApi.cs @@ -50,7 +50,7 @@ public BlockApi(IpfsEngine ipfs) this.ipfs = ipfs; } - FileStore Store + public FileStore Store { get { diff --git a/src/CoreApi/BlockRepositoryApi.cs b/src/CoreApi/BlockRepositoryApi.cs index 0a4188af..521d572b 100644 --- a/src/CoreApi/BlockRepositoryApi.cs +++ b/src/CoreApi/BlockRepositoryApi.cs @@ -34,7 +34,8 @@ public BlockRepositoryApi(IpfsEngine ipfs) StorageMax = 10000000000 // TODO: there is no storage max }; - GetDirStats(data.RepoPath, data, cancel); + var blockApi = (BlockApi)ipfs.Block; + GetDirStats(blockApi.Store.Folder, data, cancel); return Task.FromResult(data); }