node: Remove redundant filepath.Join in parsePersistentNodes.

This commit is contained in:
eternnoir 2016-11-18 12:07:45 +08:00
parent 810389c07a
commit dc197cb938

View file

@ -365,12 +365,11 @@ func (c *Config) TrusterNodes() []*discover.Node {
// parsePersistentNodes parses a list of discovery node URLs loaded from a .json // parsePersistentNodes parses a list of discovery node URLs loaded from a .json
// file from within the data directory. // 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 // Short circuit if no node config is present
if c.DataDir == "" { if c.DataDir == "" {
return nil return nil
} }
path := filepath.Join(c.DataDir, file)
if _, err := os.Stat(path); err != nil { if _, err := os.Stat(path); err != nil {
return nil return nil
} }