Skip to content

Commit 7afd7d0

Browse files
committed
eth, triedb: fix mkdir
1 parent 6bb3dfc commit 7afd7d0

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
@@ -238,9 +238,9 @@ func New(stack *node.Node, config *ethconfig.Config) (*Ethereum, error) {
238238
},
239239
// Enables file journaling for the trie database. The journal files will be stored
240240
// within the data directory. The corresponding paths will be either:
241-
// - DATADIR/merkle.journal
242-
// - DATADIR/verkle.journal
243-
TrieJournalDirectory: stack.ResolvePath(""),
241+
// - DATADIR/triedb/merkle.journal
242+
// - DATADIR/triedb/verkle.journal
243+
TrieJournalDirectory: stack.ResolvePath("triedb"),
244244
}
245245
)
246246
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)