From 29707b92520fa63fae374481af790648cd119f3b Mon Sep 17 00:00:00 2001 From: fudongbai <296179868@qq.com> Date: Tue, 10 Aug 2021 15:19:32 +0800 Subject: [PATCH] fix syc failed on windows when prune --- core/state/pruner/bloom.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/state/pruner/bloom.go b/core/state/pruner/bloom.go index 4aeeb176e8..1f7a68d690 100644 --- a/core/state/pruner/bloom.go +++ b/core/state/pruner/bloom.go @@ -90,7 +90,7 @@ func (bloom *stateBloom) Commit(filename, tempname string) error { return err } // Ensure the file is synced to disk - f, err := os.Open(tempname) + f, err := os.OpenFile(tempname, os.O_RDWR, 0644) if err != nil { return err }