Skip to content

Commit 44d3ae1

Browse files
committed
core: check ancient empty
1 parent 4bfad26 commit 44d3ae1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/rawdb/database.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func resolveChainFreezerDir(ancient string) string {
177177
// - chain freezer exists in legacy location (root ancient folder)
178178
freezer := filepath.Join(ancient, ChainFreezerName)
179179
if !common.FileExist(freezer) {
180-
if !common.FileExist(ancient) {
180+
if !common.FileExist(ancient) || !common.IsNonEmptyDir(ancient) {
181181
// The entire ancient store is not initialized, still use the sub
182182
// folder for initialization.
183183
} else {

0 commit comments

Comments
 (0)