Fix loading empty hashes
This commit is contained in:
parent
87c1a69b49
commit
f560b7f428
@ -552,8 +552,8 @@ func (s *Server) DecodeHashes(format Format, hashes []byte) error {
|
|||||||
}
|
}
|
||||||
loadedHashes := ch.SavedHashes{}
|
loadedHashes := ch.SavedHashes{}
|
||||||
err := decoder(hashes, &loadedHashes)
|
err := decoder(hashes, &loadedHashes)
|
||||||
if err != nil || len(loadedHashes.IDs) == 0 {
|
if err != nil {
|
||||||
fmt.Println("Failed to load hashes, checking if they are old hashes", err)
|
fmt.Println("Failed to load hashes, checking if they are old hashes", format, ":", err)
|
||||||
oldHashes := make(ch.OldSavedHashes)
|
oldHashes := make(ch.OldSavedHashes)
|
||||||
if err = decoder(hashes, &oldHashes); err != nil {
|
if err = decoder(hashes, &oldHashes); err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user