minor fix x2

This commit is contained in:
rigel rozanski 2017-04-18 02:50:23 -04:00 committed by Ethan Buchman
parent 6da5f72de9
commit 55e4cf17fd
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ var (
// returns 1 iff it set a file, otherwise 0 (so we can add them) // returns 1 iff it set a file, otherwise 0 (so we can add them)
func setupFile(path, data string, perm os.FileMode) (int, error) { func setupFile(path, data string, perm os.FileMode) (int, error) {
_, err := os.Stat(path) _, 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 return 0, nil
} }
err = ioutil.WriteFile(path, []byte(data), perm) err = ioutil.WriteFile(path, []byte(data), perm)

View File

@ -199,7 +199,7 @@ func verifyCmd(cmd *cobra.Command, args []string) error {
proofBytes, err := hex.DecodeString(StripHex(proofFlag)) proofBytes, err := hex.DecodeString(StripHex(proofFlag))
if err != nil { 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) proof, err := merkle.ReadProof(proofBytes)