bad = true
}
}
+
+ fullPath := toCheck[f.Name]
+ if !(len(toCheck) == 0 || fullPath != "") {
+ continue
+ }
+ if fullPath == "" {
+ fullPath = f.Name
+ }
+ s, err := os.Stat(fullPath)
+ if err != nil {
+ fmt.Println(err)
+ bad = true
+ continue
+ }
+ if uint64(s.Size()) != f.Size {
+ fmt.Println("size mismatch",
+ f.Name, "our:", s.Size(), "their:", f.Size)
+ bad = true
+ continue
+ }
+
hasher := meta4ra.NewHasher(*hashes)
var hashTheir string
var hashName string
}
}
}
- log.Fatalln("no common hashes found for:", f.Name)
+ fmt.Println("no common hashes found for:", f.Name)
+ bad = true
+ continue
+
HashFound:
- fullPath := toCheck[f.Name]
- if !(len(toCheck) == 0 || fullPath != "") {
- continue
- }
- if fullPath == "" {
- fullPath = f.Name
- }
fd, err := os.Open(fullPath)
if err != nil {
fmt.Println("Error:", f.Name, err)
fmt.Println(f.Name, hashName, "good")
} else {
fmt.Println(
- "Hash does not match:", f.Name, hashName,
+ "hash mismatch:", f.Name, hashName,
"our:", hashOur,
"their:", hashTheir,
)