mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
core/rawdb/eradb: remove symlink check
This commit is contained in:
parent
c84e977ce2
commit
4bdf29612d
1 changed files with 0 additions and 12 deletions
|
|
@ -21,7 +21,6 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
|
|
@ -65,17 +64,6 @@ const (
|
|||
|
||||
// New opens the store directory.
|
||||
func New(datadir string) (*Store, error) {
|
||||
// Ensure the datadir is not a symbolic link if it exists.
|
||||
if info, err := os.Lstat(datadir); !os.IsNotExist(err) {
|
||||
if info == nil {
|
||||
log.Warn("Could not Lstat the database", "path", datadir)
|
||||
return nil, errors.New("lstat failed")
|
||||
}
|
||||
if info.Mode()&os.ModeSymlink != 0 {
|
||||
log.Warn("Symbolic link erastore is not supported", "path", datadir)
|
||||
return nil, errors.New("symbolic link datadir is not supported")
|
||||
}
|
||||
}
|
||||
db := &Store{
|
||||
datadir: datadir,
|
||||
lru: lru.NewBasicLRU[uint64, *fileCacheEntry](openFileLimit),
|
||||
|
|
|
|||
Loading…
Reference in a new issue