fix temp path on Windows by converting backslashes to slashes

This commit is contained in:
Chris Ziogas 2024-03-27 10:50:42 +02:00
parent 55a9f40b4e
commit 5db20834f0
No known key found for this signature in database
GPG key ID: 2329CF479E36E2DA

View file

@ -23,6 +23,7 @@ import (
"math/big" "math/big"
"os" "os"
"path" "path"
"path/filepath"
"reflect" "reflect"
"testing" "testing"
@ -516,7 +517,7 @@ func testSupplyTracer(genesis *core.Genesis, gen func(*core.BlockGen)) ([]live.S
engine = beacon.New(ethash.NewFaker()) engine = beacon.New(ethash.NewFaker())
) )
traceOutputPath := os.TempDir() traceOutputPath := filepath.ToSlash(os.TempDir())
traceOutputFilename := path.Join(traceOutputPath, "supply.jsonl") traceOutputFilename := path.Join(traceOutputPath, "supply.jsonl")
defer os.Remove(traceOutputFilename) defer os.Remove(traceOutputFilename)