From df539e5d018b835475a8b910178311364fadbe90 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Wed, 25 Mar 2020 18:12:50 +0100 Subject: [PATCH] fix ledger mess --- util/util.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util/util.go b/util/util.go index e6a80d4..2f625c8 100644 --- a/util/util.go +++ b/util/util.go @@ -244,14 +244,15 @@ func CleanupLbrynet() error { if IsRegTest() { ledger = "lbc_regtest" } + lbryumDir = lbryumDir + ledger - db, err := os.Stat(lbryumDir + ledger + "/blockchain.db") + db, err := os.Stat(lbryumDir + "/blockchain.db") if err != nil { return errors.Err(err) } dbSizeLimit := int64(2 * 1024 * 1024 * 1024) if db.Size() > dbSizeLimit { - files, err := filepath.Glob(lbryumDir + "blockchain.db*") + files, err := filepath.Glob(lbryumDir + "/blockchain.db*") if err != nil { return errors.Err(err) }