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

This commit is contained in:
FrankWang 2016-11-18 19:45:06 +08:00 committed by Felix Lange
parent e1c1fce92c
commit 04edbb0703

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