mirror of
https://github.com/restic/restic.git
synced 2024-10-01 06:41:24 +02:00
Use !bytes.Equal instead of bytes.Compare !=0 to check for inequality
This commit is contained in:
parent
2f8335554c
commit
49b6aac3fa
@ -190,7 +190,7 @@ func isDirExcludedByFile(dir, tagFilename, header string) bool {
|
|||||||
Warnf("could not read signature from exclusion tagfile %q: %v\n", tf, err)
|
Warnf("could not read signature from exclusion tagfile %q: %v\n", tf, err)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if bytes.Compare(buf, []byte(header)) != 0 {
|
if !bytes.Equal(buf, []byte(header)) {
|
||||||
Warnf("invalid signature in exclusion tagfile %q\n", tf)
|
Warnf("invalid signature in exclusion tagfile %q\n", tf)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user