X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=ood.go;h=120a7de8afd554d95cb8397c01182a4db6eac99e;hb=refs%2Fheads%2Fmaster;hp=ac5730cee6dbabf91b6d0b4c1325be70504bf456;hpb=6dce71355599d4caf8267f6f02520037480f7ba3;p=goredo.git diff --git a/ood.go b/ood.go index ac5730c..120a7de 100644 --- a/ood.go +++ b/ood.go @@ -1,25 +1,24 @@ -/* -goredo -- djb's redo implementation on pure Go -Copyright (C) 2020-2023 Sergey Matveev - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, version 3 of the License. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see . -*/ +// goredo -- djb's redo implementation on pure Go +// Copyright (C) 2020-2024 Sergey Matveev +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 3 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . // Out-of-date determination package main import ( + "bytes" "errors" "fmt" "io" @@ -161,7 +160,7 @@ func isOOD(tgt *Tgt, level int, seen map[string]*Tgt) (bool, error) { return ood, TgtError{tgt, ErrLine(err)} } - if inode[:8] != ifchange.Inode()[:8] { + if !bytes.Equal(inode[:8], ifchange.Inode()[:8]) { tracef(CDebug, "ood: %s%s -> %s: size differs", indent, tgt, ifchange.tgt) ood = true OODCache[ifchange.tgt.rel] = ood