提交 04edbb07 编写于 作者: F FrankWang 提交者: Felix Lange

node: Remove redundant filepath.Join in parsePersistentNodes (#3300)

上级 e1c1fce9
......@@ -365,12 +365,11 @@ func (c *Config) TrusterNodes() []*discover.Node {
// parsePersistentNodes parses a list of discovery node URLs loaded from a .json
// file from within the data directory.
func (c *Config) parsePersistentNodes(file string) []*discover.Node {
func (c *Config) parsePersistentNodes(path string) []*discover.Node {
// Short circuit if no node config is present
if c.DataDir == "" {
return nil
}
path := filepath.Join(c.DataDir, file)
if _, err := os.Stat(path); err != nil {
return nil
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册