mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
core/rawdb: replace file.Join with filepath.Join
Signed-off-by: xiaochangbai <704566072@qq.com>
This commit is contained in:
parent
7aafad2233
commit
c83c0671a2
2 changed files with 3 additions and 4 deletions
|
|
@ -22,7 +22,7 @@ package core
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
"path"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -1966,7 +1966,7 @@ func testSetHeadWithScheme(t *testing.T, tt *rewindTest, snapshots bool, scheme
|
||||||
|
|
||||||
// Create a temporary persistent database
|
// Create a temporary persistent database
|
||||||
datadir := t.TempDir()
|
datadir := t.TempDir()
|
||||||
ancient := path.Join(datadir, "ancient")
|
ancient := filepath.Join(datadir, "ancient")
|
||||||
|
|
||||||
db, err := rawdb.Open(rawdb.OpenOptions{
|
db, err := rawdb.Open(rawdb.OpenOptions{
|
||||||
Directory: datadir,
|
Directory: datadir,
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ import (
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
@ -172,7 +171,7 @@ func resolveChainFreezerDir(ancient string) string {
|
||||||
// sub folder, if not then two possibilities:
|
// sub folder, if not then two possibilities:
|
||||||
// - chain freezer is not initialized
|
// - chain freezer is not initialized
|
||||||
// - chain freezer exists in legacy location (root ancient folder)
|
// - 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(freezer) {
|
||||||
if !common.FileExist(ancient) {
|
if !common.FileExist(ancient) {
|
||||||
// The entire ancient store is not initialized, still use the sub
|
// The entire ancient store is not initialized, still use the sub
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue