Merge pull request #796 from Gustav-Simonsson/fix_ignoring_of_unexpected_files_in_key_dir

Fix ignore of unexpected files in key dir
pull/813/head
Jeffrey Wilcke 10 years ago
commit 7afbd0f20d
  1. 5
      crypto/key_store_plain.go

@ -117,13 +117,12 @@ func GetKeyAddresses(keysDirPath string) (addresses [][]byte, err error) {
if err != nil { if err != nil {
return nil, err return nil, err
} }
addresses = make([][]byte, len(fileInfos)) for _, fileInfo := range fileInfos {
for i, fileInfo := range fileInfos {
address, err := hex.DecodeString(fileInfo.Name()) address, err := hex.DecodeString(fileInfo.Name())
if err != nil { if err != nil {
continue continue
} }
addresses[i] = address addresses = append(addresses, address)
} }
return addresses, err return addresses, err
} }

Loading…
Cancel
Save