Skip to content

Commit 78162b8

Browse files
committed
eth, triedb: fix mkdir
1 parent fb44328 commit 78162b8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

eth/backend.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
240240

241241
// Enables file journaling for the trie database. The journal files will be stored
242242
// within the data directory. The corresponding paths will be either:
243-
// - DATADIR/merkle.journal
244-
// - DATADIR/verkle.journal
245-
TrieJournalDirectory: stack.ResolvePath(""),
243+
// - DATADIR/triedb/merkle.journal
244+
// - DATADIR/triedb/verkle.journal
245+
TrieJournalDirectory: stack.ResolvePath("triedb"),
246246
}
247247
)
248248
if config.VMTrace != "" {

triedb/pathdb/journal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func (db *Database) Journal(root common.Hash) error {
342342
)
343343
if journalPath != "" {
344344
// Write into a temp file first
345-
err := os.Mkdir(db.config.JournalDirectory, 0755)
345+
err := os.MkdirAll(db.config.JournalDirectory, 0755)
346346
if err != nil {
347347
return err
348348
}

0 commit comments

Comments
 (0)