Skip to content

Commit

Permalink
Merge pull request #796 from Gustav-Simonsson/fix_ignoring_of_unexpec…
Browse files Browse the repository at this point in the history
…ted_files_in_key_dir

Fix ignore of unexpected files in key dir
  • Loading branch information
obscuren committed Apr 24, 2015
2 parents c8e21a4 + b0bf12e commit 7afbd0f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crypto/key_store_plain.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,12 @@ func GetKeyAddresses(keysDirPath string) (addresses [][]byte, err error) {
if err != nil {
return nil, err
}
addresses = make([][]byte, len(fileInfos))
for i, fileInfo := range fileInfos {
for _, fileInfo := range fileInfos {
address, err := hex.DecodeString(fileInfo.Name())
if err != nil {
continue
}
addresses[i] = address
addresses = append(addresses, address)
}
return addresses, err
}

0 comments on commit 7afbd0f

Please sign in to comment.