mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-31 09:03:46 +00:00
Merge branch 'ethereum:master' into gethintegration
This commit is contained in:
commit
fbaafaf988
1 changed files with 4 additions and 0 deletions
|
|
@ -87,6 +87,10 @@ func NewFreezer(datadir string, namespace string, readonly bool, maxTableSize ui
|
|||
)
|
||||
// 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 ancient database is not supported", "path", datadir)
|
||||
return nil, errSymlinkDatadir
|
||||
|
|
|
|||
Loading…
Reference in a new issue