mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 14:16: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"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"os"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
|
@ -65,17 +64,6 @@ const (
|
||||||
|
|
||||||
// New opens the store directory.
|
// New opens the store directory.
|
||||||
func New(datadir string) (*Store, error) {
|
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{
|
db := &Store{
|
||||||
datadir: datadir,
|
datadir: datadir,
|
||||||
lru: lru.NewBasicLRU[uint64, *fileCacheEntry](openFileLimit),
|
lru: lru.NewBasicLRU[uint64, *fileCacheEntry](openFileLimit),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue