Blob Blame Raw
 VERSION                | 2 +-
 caching/cache_check.cc | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/VERSION b/VERSION
index cb0c939..7d85683 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.5.2
+0.5.4
diff --git a/caching/cache_check.cc b/caching/cache_check.cc
index 005159e..9bd34be 100644
--- a/caching/cache_check.cc
+++ b/caching/cache_check.cc
@@ -220,7 +220,9 @@ namespace {
 		write_superblock(bm, sb);
 	}
 
-	error_state metadata_check(block_manager<>::ptr bm, flags const &fs) {
+	error_state metadata_check(string const &path, flags const &fs) {
+		block_manager<>::ptr bm = open_bm(path, block_manager<>::READ_ONLY);
+
 		nested_output out(cerr, 2);
 		if (fs.quiet_)
 			out.disable();
@@ -295,8 +297,7 @@ namespace {
 			throw runtime_error(msg.str());
 		}
 
-		block_manager<>::ptr bm = open_bm(path, block_manager<>::READ_ONLY);
-		err = metadata_check(bm, fs);
+		err = metadata_check(path, fs);
 
 		bool success = false;