Merge branch 'ethereum:master' into gethintegration

This commit is contained in:
Chen Kai 2025-01-06 15:05:23 +08:00 committed by GitHub
commit fbaafaf988
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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