Skip to content

Commit

Permalink
minor fix x2
Browse files Browse the repository at this point in the history
  • Loading branch information
rigelrozanski authored and ebuchman committed Apr 21, 2017
1 parent 6da5f72 commit 55e4cf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/commands/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var (
// returns 1 iff it set a file, otherwise 0 (so we can add them)
func setupFile(path, data string, perm os.FileMode) (int, error) {
_, err := os.Stat(path)
if !os.IsNotExist(err) { //permission errors generated if use os.IsExist
if !os.IsNotExist(err) { //note, os.IsExist(err) != !os.IsNotExist(err)
return 0, nil
}
err = ioutil.WriteFile(path, []byte(data), perm)
Expand Down
2 changes: 1 addition & 1 deletion cmd/commands/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func verifyCmd(cmd *cobra.Command, args []string) error {

proofBytes, err := hex.DecodeString(StripHex(proofFlag))
if err != nil {
return errors.Errorf("Proof (%v) is invalid hex: %v\n", proofBytes, err)
return errors.Errorf("Proof (%v) is invalid hex: %v\n", proofFlag, err)
}

proof, err := merkle.ReadProof(proofBytes)
Expand Down

0 comments on commit 55e4cf1

Please sign in to comment.