X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=depfix.go;fp=depfix.go;h=87ecd882961cf8026d2398dc0dcf4a96bbbac2c9;hb=0db0e21921706ba645c229e809fd3668542dcaae;hp=bf048798aad0a15c613deff75662ba3d54b9e193;hpb=eaaa94c54d8b4a7755c4926de10ed987831972d0;p=goredo.git diff --git a/depfix.go b/depfix.go index bf04879..87ecd88 100644 --- a/depfix.go +++ b/depfix.go @@ -18,7 +18,6 @@ along with this program. If not, see . package main import ( - "bytes" "encoding/hex" "errors" "io" @@ -150,7 +149,7 @@ func depFix(root string) error { if err != nil { return ErrLine(err) } - if !bytes.Equal(hsh, theirHsh) { + if hsh != string(theirHsh) { tracef( CDebug, "depfix: %s/%s -> %s: hash differs", root, entry.Name(), dep, @@ -160,7 +159,7 @@ func depFix(root string) error { fields = []recfile.Field{ {Name: "Type", Value: DepTypeIfchange}, {Name: "Target", Value: dep}, - {Name: "Hash", Value: hex.EncodeToString(hsh)}, + {Name: "Hash", Value: hex.EncodeToString([]byte(hsh))}, } fields = append(fields, inode.RecfileFields()...) fieldses[len(fieldses)-1] = fields