core/rawdb: replace file.Join with filepath.Join

Signed-off-by: xiaochangbai <704566072@qq.com>
This commit is contained in:
imalasong 2024-04-07 15:56:03 +08:00 committed by xiaochangbai
parent 7aafad2233
commit c83c0671a2
2 changed files with 3 additions and 4 deletions

View file

@ -22,7 +22,7 @@ package core
import (
"fmt"
"math/big"
"path"
"path/filepath"
"strings"
"testing"
"time"
@ -1966,7 +1966,7 @@ func testSetHeadWithScheme(t *testing.T, tt *rewindTest, snapshots bool, scheme
// Create a temporary persistent database
datadir := t.TempDir()
ancient := path.Join(datadir, "ancient")
ancient := filepath.Join(datadir, "ancient")
db, err := rawdb.Open(rawdb.OpenOptions{
Directory: datadir,

View file

@ -21,7 +21,6 @@ import (
"errors"
"fmt"
"os"
"path"
"path/filepath"
"strings"
"time"
@ -172,7 +171,7 @@ func resolveChainFreezerDir(ancient string) string {
// sub folder, if not then two possibilities:
// - chain freezer is not initialized
// - chain freezer exists in legacy location (root ancient folder)
freezer := path.Join(ancient, ChainFreezerName)
freezer := filepath.Join(ancient, ChainFreezerName)
if !common.FileExist(freezer) {
if !common.FileExist(ancient) {
// The entire ancient store is not initialized, still use the sub